The law's quite good, really, seeing that it's do with discouraging landlords from keeping housing off the market. It was (and still could be) quite a problem in such a crowded little island. If the owner of the property can demonstrate they live there, then the squatters can be evicted.
It was a very big issue after the war because millions of houses had been destroyed in the bombing, meaning that millions of families were homeless, living in barracks (if they were lucky) or, just as common, in tents with open fires - hardly what soldiers, sailors and airmen who'd just fought across Europe, Africa, Asia and the Middle East for six years should come back to. Despite that, there were quite a few empty properties held by landlords who weren't, often because of rent controls, leasing out the buildings or because they were upper class dwellings for an upper class which had effectively ceased to exist due to the war. So, people sorted out the issue on their own terms (with the help of the Communist Party) and took over the buildings. A rather nice solution, all in all and one which the government accepted as a good way of taking the pressure off a construction industry which was struggling with the task of rebuilding the country. It also punished landlords, and the Labour govt back then didn't give a hoot what they thought.
Because of the laws sorted out around then, if squatters have held the property for 12 years, then a court will grant them the deeds to the property. They can't break into the property and they need to demonstrate it was unoccupied, but, by and large, if those two conditions are met, then the squatters can stay and the landlord is stuck. The interpretation has moved against squatters over the years, but England still has amongst the most pro-squatter laws in the world.
To get around this, there's actually a neat little black-market in landlords who offer dramatically reduced/zero rents to people who're willing to live in buildings which don't comply with the law and will be redone in the future, but which are (for the moment) unoccupied and so legally vulnerable to squatting.