Before the recent pilot shortage started to really take effect this was fairly common around the globe and is still prevalent in some places. Low Cost Carries like Ryanair pinch pennies across the board to offer cheap flights. This in turn created a segment of the market that the major airlines (at least in the US and presumably elsewhere) took advantage of. Major airlines focused on longer haul international routes flying big metal and left short hop flights to either regional airlines or smaller affiliates which often conform to the low cost model.
However the big planes still needed pilots, so the low cost carriers became feeder programs for their bigger airline counterparts. Part of the reason Low Cost airlines can offer such low wages is that generally pilots don't work there that long. Much like flight instruction or banner towing it has become a way to effectively build hours to fly bigger planes. In some cases Low Cost Carriers also offer cadet/training programs that may undercut the cost to train pilots. Instead of taking it out as debt against the pilot then garnishing wages later they simply pay less.
Recently pilot wages (at least in the states) have seen a healthy increase to attract new people to the profession.