IIRC at least a couple of the rail companies have been relying on the existing train drivers doing overtime, and have tried to force those drivers to do more hours as "standard" without an increase in pay.
Those same train companies have refused to hire more drivers because it would have meant training them and then paying them, when they thought they could basically increase the hours the existing drivers worked whilst giving an effective pay cut (IE increase the base hours, and change the times that are classed as "anti social" thus removing things like shift allowances for working late/early/weekend).
Basically you can have both, they're not mutually exclusive as there is nothing stopping drivers objecting to a below inflation pay rise or an effective pay cut, whilst at the same time there are people that are willing to take on the job but not any openings because the company doesn't want to employ more staff, or not wanting to pay to train those new staff.
This is a very large part of the reason some of the companies have been having issues for a while even before the strikes, where they had relied on the drivers being willing to work additional shifts every week they ran into issues when those drivers refused to do them, or when say a driver is off ill and it turns out that running staffing at below the minimum levels is not actually sustainable as you have no ability left to cover absences.
It's not a unique thing to the railways, it's something that is depressingly common in the UK (and US), companies not being willing to invest in actually providing training for staff if it appears to be cheaper to just try and rely on overtime for existing staff (especially if you can change the contracts so the "normal" hours include those that used to pay a bonus), and it has a tendency to eventually cause an issue.
It's one of the reasons the UK is so far behind a lot of other countries in terms of productivity, companies won't invest in their people or equipment if it means eating into the profit for the next quarter (let alone next couple of years, even if it means that your profit after that is likely to be consistently higher and make up for it quickly).