The purpose of a closing agent is to collect the deed and the money and distribute them properly. In the old days, without closing agents, the party with the gun usually went off with both the deed and the money.
Actually, what really happened more frequently is that the seller took the money and gave the buyer a deed, but when the buyer went to record the deed, they found that some other buyer had gotten there first.
Today, a closing agent's job is to verify that the terms of the purchase agreement have been fulfilled, to get the deed recorded and get the money to the seller. Usually, this is in the best interest of the buyer.
Hope this helps,