I'm pretty sure the school haven't done this for the hell of it. Two pretty big price rises in close succession suggests the fees they were charging before weren't really viable or didn't have much flex in them.
There is a national shortage of teachers. This means private schools have to pay more to attract and retain good staff. As state sector pay increases, if they lag behind then they may struggle to recruit. I know many private schools pay over the odds to recruit physics specialists etc. Staffing is the biggest cost for any school, and when there is a shortage of labour, wages will obviously go up.
Schools are also facing massively increased energy bills, and many private schools will have a bigger energy bill than state schools to start with because of expensive facilities like floodlit pitches, swimming pools etc.
In the next few years, some schools are also facing large capital IT costs, because of the move to windows 11 - this means replacing any machines that won't run it. At my school, we have a lot of laptops that are less than 5 years old but won't run windows 11. In a private school it's likely these would be replaced, and this will run in to thousands.
There's a longish running thread on secondary education discussing all these things in a more rational way, and lots of people are reporting rises of over 10%.
The rises OP describes are especially steep though, which makes me wonder if this particular school is in financial trouble or maybe knows they will need to carry out some expensive building work soon. I would be looking at the school accounts carefully and consider moving my children to somewhere that seems a bit more stable.
I'm sure the people running the school are aware of the impact of these fee rises, I doubt they would have done it if they felt they had other choices.