I share concerns about the lack of anonymity, but don't think there's an issue with the content.
It's for secondary year fours and upwards, so 14+. Plenty of 14 year olds are having sex, whether or not you like it (and, anecdotally, a very small handful have had anal sex by the time they've left school/college).
Surely it's better to gather data from young people to see if they can spot trends - for example, an increase in sexual activity, or in a particular type of drug use - that can inform PSHE/similar lessons and awareness in schools, as well as directing local government resources or policing to areas where associated criminal activity might also be increasing?
So no, don't think it's a bad thing. But do think the need to add an identifying candidate number is bad.