...how? From what I can tell, here in SF, "subsidized" housing is requirement for folks who are building new apartments to "Set aside a certain number of apartments for people making 90%->120% the area median household wage." and/or "Subject a certain number of apartments to the city rent control ordinances.".
If you're living in a rent-controlled apartment, it's not permitted for the total amount of rent that you collect from all of your roommates to be more than the amount of rent you pay your landlord.  I don't know the details of how the "low income" housing program works, but I would be floored if there weren't periodic checks to ensure continued income eligibility and to ensure that folks aren't making a profit off of subletting.
 If you're profiting from your roommates, your roommates can go to the city Rent Board, who will then require that you return the excess money back to them.