The goal is a quality of life benefit for the community. Just like public schools, parks, riverwalks, and paved streets. You're not going to pay for the O&M of many transit systems collecting change at the fare box. These things pay for themselves indirectly, when properly planned and integrated with supportive land uses, in the form of higher property values and a denser built environment.
Take NYC for example. Imagine Manhattan without transit. You'd have a ton of parking lots, more street congestion, a fraction of the built square footage and property taxes.