it has NOTHING to do with sexual gratification. Cow-boy's position would result in distributing child pornography charges. That would really help in the defense of the case.
The law was first established to protect young women from having their "virtue" taken by older men and more importantly to prevent pregnancy. It sort of forces a guy not to have a one nighter with a young looking girl. Yes, she can lie about her age but if she denies she said she was older than 18 what other proof do you have? The defense of "she said she was 18" has most people rolling their eyes when they hear it.