The problem with this scenario is the same one as that person will have at the immigration checkpoint: while the law says that US citizens cannot be denied entry, how does the immigration officer know that they are, in fact, a US citizen? Now, the immigration officer has four things that the gate agent does not have:
- Access to the full resources of the US government, so they could, for example, use a birth certificate, driver's license, social security number, etc. to verify that person's identity, and from verifying the identity go on to verify the citizenship status.
- Knowledge of US immigration and citizenship law.
- Time. The law says that US citizens cannot be denied entry, it doesn't say that they can't wait a little bit while their citizenship status is verified.
- Experience in recognizing, reading, interpreting, and verifying various documents that can be used to establish identity or citizenship, such as birth certificates.
The gate agent has none of that. They are not US government agents, they cannot take an arbitrary amount of time (the plane's not waiting, but the other passengers in the queue are!)
How would the person prove to the gate agent that they are, in fact, a US citizen, and do that in a way that is fast to verify, easy to verify, and possible to verify for a random gate agent of a random airline at a random airport in a random country? Where I fly from, some gate agents don't even work for a single airline, they are provided by the airport as a service to the airlines. They might handle an Asiana flight to Seoul right now, an hour later a South African flight to Johannesburg, and then a Delta flight to Atlanta.
Do you expect them to memorize the immigration law of every country on the planet, and be familiar with the citizenship laws of every country on the planet, and be able to recognize, read, interpret, and verify every possible document that can be used to prove every possible citizenship of every country on the planet? Heck, people in the US cannot even agree with each other whether Barack Obama was born in the US or Kenya!
It is simply impractical to expect a gate agent to be able to verify that someone is a US citizen who has no document showing that they are a US citizen.
It is just much easier, and much cheaper, to rely on an automated system that contains a set of simple, easy to follow, and easy to check rules, and that system says that in order for a US citizen to fly to the US, they need a valid passport. The US government could have put a different rule in the system, but they decided not to.
Note that there is another aspect that was not mentioned in the question nor in any of the answers so far that has nothing to do with immigration or citizenship: airlines are also, in at least some cases, required to verify the identity of their passengers. Typically, travel documents (and certainly passports) also pull double-duty as identity documents. So, even if this hypothetical passenger were allowed to board the plane for immigration reasons, they would still need to prove their identity using a valid, internationally recognized identity document … most likely a passport.