It's illegal for an adult to have sex with a 15 year old, but there's considerable gap between the likely tariff for "Had sex with a 15 year old" versus "Rape". The maximum tariff for having sex with a 15 year old is not inconsiderable (14 years) but it's far short of the tariff for rape (life imprisonment).
In the case of a 15 year old either might be plausible for prosecutors depending on what evidence they have. If it's clear there was no consent, it'd always make sense to charge rape regardless of whether they're sure they can persuade a jury the defendant knew the victim was under age - but if consent is tricky, or especially if the victim is prepared to testify for the defence that they consented, then you need solid proof the defendant knew they were under age or it won't go anywhere.
This last sentence is a bit wrong.
Where the child is under 16 and has not consented the CPS recommend prosecuting for rape because that's a more serious offence. Where the child is under 16 but is "consenting" the offence of rape cannot be proved (because rape requires lack of consent), so the CPS recommend charging for section 9 sexual activity with a child.
https://www.cps.gov.uk/legal-guidance/rape-and-sexual-offenc...
> Conversely, when reviewing cases involving children under 16 and 18 prosecutors should select more serious charges involving proof of absence of consent over those contained in sections 9 to 12, where all the elements can be proved. So, for example, section 1 rape should be preferred to section 9 sexual activity with a child under 16 where the elements of rape are satisfied.