I think in the example given, it is more a case of racism.
The law is obviously antiquated. If every under-age boy who got an underage girl was prosecuted for statutory rape, then sooner or later the law would have to change. As it stands it can be used depending on who the male.
You would have to be careful if you are a black guy shagging the vicar's daughter.