It's surprising in some ways, since the thing that distinguishes government from the private sector is that government is optimized for safety, equality, impartiality, etc, rather than for profit.
But perhaps the way they achieve such impartiality is by codifying absolutely every detail, and then you end up with situations like this one.
Stepping back though, the British immigration system is indeed quite hostile. Possibly one reason may be that once you are 'in', you get automatic access to a huge array of valuable state services; free healthcare, schooling, etc. If you've ever lived in places that have none of these, you can really appreciate how valuable they are.
And I think a 'solution' to that issue could be to have stricter controls on who gets access to all those services, but be less strict about who can come and stay - based on skills perhaps.
And while they're at it they could make it easier for Britons who have married foreigners and had kids abroad, to be able to repatriate - as it is, it's more than a little difficult. I understand the rules are to prevent some the gross abuses that have occurred, eg recently-established Britons bringing in uneducated "wives" from foreign rural villages and so on, but they also deeply affect more legitimate situations.