What madman/woman would invest in the stock market today?
I am, for my retirement investments. I'm 30 years old, I don't really care what the market does next month, and I prefer to have aggressive investments that could pay off bigger.
Anyone who said the stock market doesn't involve risk is clueless. You have to take more risk to make more money. If you want a safe investment you can have a CD or a high interest checking account and make 3%, which could be fine for now because inflation is low.
To answer the OP's question, why not start paying your loans even sooner? I just finished residency and I started paying $400 per month the first month of internship while my loans were still in deferment. During all three years I paid at least $400 a month, sometimes up to $600 a month if I had some extra cash. I live in a high cost of living area and made a resident salary of about $45K a year.
Now my loans just went into repayment and on the extended payment plan, I pay $500 a month which is what I was already paying. Instead of $185,000 plus interest, I managed to pay my loans down to about $175,000 (for my loans, part of them were at low interest, and part at high interest, and the monthly interest was probably $400 a month). So I put about $6000 a year in for 3 years to do that.
Now I am in a fellowship and plan to try to put $1000 per month in using moonlighting money. I have to admit that even if all my loans were at 2.75%, I still wouldn't be happy having $185K hanging over my head and would want to pay it off, so sometimes emotions are not completely mathematically sensible.
The reason why most attendings don't live like residents, and don't use common sense in where to put their money, is because it's not very gratifying. After suffering through residency you feel like you deserve a nice house, a nice car, etc. I've seen it happen to lots of people. They know they will pay the loans off eventually and they don't want to live more frugally in the meantime.
Logically it may not make sense but it's everyone's right to do it the way they want to, some people may hate debt like you and me and see the benefit of paying off loans early, other people just want to enjoy life and not worry about it. EM is a good specialty for paying off loans because you get free time during residency that you can moonlight, and you can work really hard if you want to and make crazy money or you can take it easy and still make pretty good money.
What if you get married during residency or decide you want to do academics or fellowship? You can't count on being a single dude making a community salary, that is only going to be a certain percentage of people.