It is unfortunately a real thing.
In lots of areas, the best-performing school is run by the church. Schools affiliated with religious organisations, known as faith schools, are allowed to select the majority of their pupils by religion, and can demand proof of regular attendance at church/synagogue/mosque in order to qualify for a place.
So, many parents do indeed attend church for the couple of years leading up to time when their child is of the age to apply for the school, even if they're not really religious - the school doesn't demand proof of actual religious belief or practice, just attendance.
This therefore quickly becomes a self-reinforcing circle: the school selects children of the sort of (mostly middle-class) parents who are willing to devote regular time to attending church in order to get their children into a good school, so the school tends to get better results and is therefore desirable by those parents.
Note also that strangely it was Tony Blair's Labour government from 1997 onwards that started this, by relaxing the rules around religious organisations running schools and extending it to religions other than Christianity. More than a third of schools in the UK now have some kind of religious character, even though the UK as a whole is largely non-religious.
Richard Dawkins made a documentary on this, Faith School Menace?, in 2010.