As far as I’m aware the money is payed to the flying school, which in Australia for the most part is not connected to the airline. The airline does spend some amount of HR resources with regards to selection, monitoring and overall assessment of the cadet’s performance.
If the endorsement costs for Jetstar pilots is anything to go by there is possibly a "facilitation fee" to cover some of the costs associated with the HR resources.