@bafanguy
For an airline-based ab initio program, the airline will sponsor (finance or reimburse) substantially all training costs from zero hours all the way to the point they hire you as a First Officer.
Often room and board are included as well. Some even offer a monthly stipend / allowance throughout all your training!
In return for this financing (and hopefully future employment), you agree to a security bond, or a service bond, and/or partial repayment scheme.
E.g., the contract might stipulate that you won't jump to another airline for x number of years, and/or that you will pay back y% of the training costs (deducted from your wages) over a certain amount of time.
Naturally airline-based ab initio program are highly selective since the airline is investing a significant amount of time and money in your training.
These programs are very common outside of the US, especially with mainline carriers in Europe and Asia.
Examples include the British Airways Future Pilot Programme, Lufthansa Ab Initio, Singapore Airlines Cadet Pilots, and the Cathay Pacific Cadet Pilot Programme.
And of course, virtually all military pilots go through similar cadetship programs and agree to a number of service years.
The commonality on all these ab initio programs is that the employer pays for a substantial proportion of the flight training costs, even after taking into account the bond service or repayment schemes.