And really good doctors have really high bills to pay, as well. Not many developers need 8 years of the best schooling (one could make the argument that really good developers don't need any schooling, although it helps).
Your point still stands, but student loans from med school are nothing to brush aside.