You want to make it easy for people to know whether another person has the legal ability to consent. If consent is about whether the person had taken an exam, it would be hard to know.
A twenty five year old woman who doesn't want to have sex before marriage for religious reasons could simply avoid taking the test. People who take the test before getting married could be expelled by the local church.
The proposal seems to give fundamental Christian's a ugly tool for charging people who engage in premartial sex with rape.
You want to make it easy for people to know whether another person has the legal ability to consent. If consent is about whether the person had taken an exam, it would be hard to know.
Although you raise some compelling arguments against the proposition of an exam, I'll note that in cases in the vicinity of the borderline, legal ability to consent by age is already quite hard to judge; people rarely card prospective sex partners.
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.