Because it's likely my best shot at financial independence. There's no other line of work I can pursue without taking on tens of thousands in student debt and starting over career-wise.
I've worked in several industries in my life, and it's not like tech is unique this way. In a lot of ways, finance is much, much worse. It would be great to have enough money to pursue whatever goal or passion I wanted, but that's not my reality.