You said, "What would be the reason to not send the user directly where they want to go?" You're making one very dangerous assumption, which is you believe you know exactly where the user is trying to go. I hate to burst that bubble, but from professional experience, I can tell you in most cases you do not have the level of certainty you believe you do, and the few cases where you might are the edge cases, not the norm.
You also said, "the only reason to log in on casper.com is also to view/edit your order." I completely disagree as you're missing one major reason someone would log in, which is to make a purchase. In the case of casper.com, redirecting the user to their order history or account page after logging in could result in losing out on conversions. If I'm browsing casper.com for an item and decide to log in, the last thing you'd want to do is redirect me to a different page. It's the same reason websites like Amazon keep you on the same page after logging in. Most eCommerce sites or businesses in general care most about boosting conversions, in this case that would be sales, for other websites it might be newsletter sign-ups or followers on a blog.
Ultimately, there is no cookie-cutter copy-and-paste answer to your question. Every website has different goals, but every website will try to do one thing: keep users on their highest conversion pages as long as possible. Redirecting the user to another page without knowing the user explicitly requested to go there is a big no-no.