Not legal, but officially tolerated, which means that no prosecution will take place if one doesn't follow this law. This is quite a common thing in the Netherlands, my country, and I think it makes sense. You don't think something should be legalized, but it is not problematic enough to prosecute one for it either.
Then what's the point in making it illegal? What's to stop prosecutors from enforcing the law when they feel like it, and not enforcing it when they don't. It's "tolerated" unless
their daughter hooks up with an 18 year old. Then it's time to bring out the big guns and "enforce the law as it's written". If you want to "send a message of condemnation, but tolerance" then do it in public forums and not in legal code.
What you're saying just seems deeply illogical.