You can apply and get a TN-1 without doing so crossing a border [1]. If you have a straightforward application though there's no reason to which is why so many people just apply on their way though.
[1] https://help.cbp.gov/app/answers/detail/a_id/978/~/how-to-ob...