I don't think they do ask in the UK.
There is a section that the person interviewing you sees and there is a section that HR sees. The HR section has sensitive data such as sex, race, sexual orientation, religion etc and is used to make sure the company isn't showing a pattern of bias in its hiring. The interviewer doesnt see it. This is voluntary and you don't have to fill it out. Bear in mind the last job i appliee for was in Scotland so it may just be Scottish law not UK law.