Why do PIs say no to students working during grad studies? Professors in my department frown upon students working (part-time or full-time) during their MSc or PhD. Even extra TA hours are looked down upon...

The rent on-campus is ~$950/month and we are paid ~$18000/year. So there is enough money BUT the on-campus housing is very limited so students usually have to find off-campus res ... which is ~$150 more per month. Again, while I can make it work w/ $18k, I'd like some extra income to help pay off undergrad loans.

What is the reason behind saying no to students working while doing graduate studies? I'd like to understand the PI's perspective.

Does working while doing graduate studies affect the student's performance negatively?

University: top-20. Area of study: life science, computer science.

(Unrelated question: how many hrs/week should students put into their lab?)
I have the impression that you are pretty aware of the main reason why PIs tend to frown upon outside jobs - they take time and mental energy, and most PIs will expect you to commit as much as you can of both to your grad school project. Hence, working on the side will typically  affect the student's performance negatively.

There is also the added problem that outside jobs often provide unwanted rigid commitments, which tend to interfere with the somewhat unstable nature of grad school workload. It is exceedingly annoying for a PI if a major paper deadline needs to pass, because the student also had important duties at their day job that they could not get away from.