The price there just reflects how much students are ready to pay. Cooking is actually cheaper when done en masse. Just look at how poor countries and army handles it.
I spent two months in Thailand living off street vendor food and never had any issues. Then again after a misunderstanding I spent three days drinking the tap water (which even the locals won't drink) before getting sick, so maybe I'm just robust.