You have to show up at the border day of to get a TN visa and there's no guarantee you'll get it. H1B is a much more reliable and safer path which is why it's prefered.
It’s much easier to get a TN because there is no quota. Because the H1B is subject to lottery because more people apply than the quota, you have to apply in April to start a job in October. That’s generally not welcome by most employers.
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.