One possible scenario could be that she did not amend her passport yet with her new name ( could have been a number of reasons for that ). After birth, she found out what the law was. So, instead of claiming that she was married, she told the consulate officer that she was unwed - there was no way to prove otherwise. Thus the COC was issued despite her being underage.
You’re right. I forgot to include that scenario, when I got sidetracked wondering why this 17 or 18 year old girl would have reason to have obtained a U.S. Passport before her ostensible marriage to Barack Hussein Obama on 2 February 1961. A U.S. Passport was not required to travel between the State of Washington and British Columbia, so why would such a young girl have obtained a U.S. Passport under her own maiden name before her alleged marriage? It would appear more likely she would have either obtained the U.S. Passport under her married name or under her maiden name after the date of the alleged marriage.