Lyft on Monday announced it's buying the bike-sharing firm behind New York Citi Bikes and San Francisco's GoBikes for a reported $250 million. But it happened after Uber passed on the deal, according to a person familiar with the matter.

Uber had previously looked at Motivate to expand its burgeoning bike offerings but walked away out of concern with Motivate's unionized workforce and city contracts, the person said. An Uber-Motivate deal could have locked in a considerable bike-sharing advantage over arch-rival ride-sharing service Lyft.

Uber announced in April it was buying electric bike company Jump Bikes, and top executives for both Uber and Lyft have said they want to be the leading transportation platform of the future. The two companies have each ratcheted up their offerings practically in tandem while they race toward IPOs. (Uber is still worth about four times Lyft's value, though.)

Axios reported in June Uber was eyeing Motivate, but details of why the deal fell apart — and why it may be a problematic deal for Lyft — have not been previously reported.

Contracts. Motivate operates docked bike-sharing programs in eight U.S. markets, including New York City, San Francisco and Chicago. Those partnerships could be in jeopardy under terms of an acquisition, the person familiar with Uber's talks said.

Motivate's contracts with partner cities include a clause that allows cities to unilaterally terminate the program should the company be bought, the person said, constituting too large a risk for Uber. At least one city contract also requires city approval for any change in pricing or equipment, they said.

A spokesperson for the Lyft-Motivate deal maintained that "the cities believe in our vision for growth and are glad Motivate’s outstanding operations team will remain in place."

Unionized workers. Motivate operates separate maintenance and servicing operations, which will remain as a separate company doing contract work for Lyft. Some Motivate workers who perform these tasks are unionized, posing another problem for Uber, according to the person.

The workforce structure "opens a door for unions to organize Lyft much more aggressively," the person said — a liability Uber wasn't willing to take on.

Uber for its part has a notably rocky past with issues of workers' rights. The firm has previously called on states and independent associations to provide benefits and forums for so-called gig economy workers.

But it's also repeatedly argued in court that its drivers are independent contractors, rather than Uber employees who would have the ability to unionize.