They aren't watching you in the bathroom. They are recording cars on public streets and analyzing the footage.

Why not? Don't you want to stop all the crimes happening in bathrooms too? That would be a logical step if privacy is always an acceptable tradeoff for security (or at least the illusion thereof).

The difference is that public streets are public spaces. You necessarily have a limited expectation of privacy in public spaces. The government likewise already deploys cameras in public places to maintain a reasonable level of order on them.

If you want to put a camera in your personal toilet you absolutely can.