The two simplest reasons among many are:
a) a realtor deals in mortgages everyday, and thus knows what they are doing. Would you buy your medical prescriptions from a computer store? No, because the computer guy knows nothing about medicine. So why would you buy a house from someone for sale by owner, typically they will know less about selling a house than the computer guy knew about which hand cream will cure your cold.
b) Realtors are regulated and required to maintain professional standards. That means that if they mess up, you will have a prescribed course of action against them, and you will be much more protected than if you bought a house privately.
Buying a house is the most complicated transaction you will ever make, use a professional to take care of the dirty work for you.