It's based on the precendent set this year in a BC case, where a political student's group ad was rejected by BC Transit. The ultimate summation by the courts was that the transit system is a "quasi-government institution" and that they were infringing on the groups right to freedom of expression.
The TTC as a publically funded (by 3 forms of government) company, and could legally be held to the same standard.
I mean the ad's (although distasteful to some) are not illegal or offensive in any way, and in the era of massive defecits and constant fare increases, the TTC should take whatever money it can get.