For larger transactions, it is also common to get a "cashier's check", drawn on the bank's own accounts to minimize the seller's counterparty risk.
The rationale for the in-town restriction is also to limit counterparty risk: if the check is from an unfamiliar bank, it is more likely to be bogus and the seller won't be able to verify the account with a quick call to a known bank nor expect to be able to address fraud within the local law-enforcement framework.
I have suddenly had a vision of Clint Eastwood, in High Plains Drifter mode, riding into town and attempting to cash a cheque :-)
Basically, you can tell from the routing number on a check where the bank is. Back in the day, if the bank wasn’t from NYC or the same region they wouldn’t honor the check. Checks were mailed between clearing systems and would take weeks to clear. My dad maintained a bank account at the Bank of New York specifically for business travel in the 80s.
That’s mostly gone now as ACH is automated and quick.