TL;DR: You have to do something to accept a document; a signature is often used because it is simple and permanent; signature alone is often not enough (e.g. wills); claiming a false signature annuls the contract for both parties and you cannot keep the accrued benefits.
Signing something means you accept it and it becomes legally binding.
Many things can become binding without signature (including your usage of this website) and signatures alone are not considered trustworthy in many circumstances.
Important documents (e.g. wills, marriages, real estate transactions) in many jurisdictions require a public official (notaries, marriage commissioners etc.) or a trustworthy person (lawyers, doctors, professional engineers, etc.), who will often require rigourous identification documents, and/or witnesses to be involved for the documents to be legally effective.
Some high-value commercial transactions will also involve witnesses for signature, or require witnesses for executions of certain articles.
Otherwise I can always claim that I didn't really sign that document when it becomes convenient for me.
You can and people do. Then the parties go to court or other dispute resolution mechanism, and the judge will consider all relevant evidences to decide (often on a balance of probabilities, i.e. more likely than not) if you consented to a document. Particularly, "when it becomes convenient for me" is often after some elements of the contract having been executed, which is evidence in favour of the existence of the contract and nonexistence of a contract removes obligations and rights for both supposed parties, as such the executed part could be undone. If for a sales contract the other party has sent you a computer, you cannot claim that you did not sign that contract and keep the computer they sent. Without the contract, the computer is not rightfully yours.
Also, claiming false statements for benefit or under oath is fraud/perjury and can be criminally prosecuted.
So, why are they used everywhere?
You have to do something to affirm your consent to a document.
It is symbolic but symbolic does not mean meaningless and a symbol of your consent is often desirable.
A signature is simple and:
- affirmative of your intention, unlike a simple visual inspection of document (perhaps eventually someone will argue your eye movement can be used, e.g. for VR)
- permanent, unlike oral declarations (which can still be legally valid, even if hard to prove)1
which is enough for most purposes. As a bonus, it is also somewhat unique and can be compared to certain extent.
For purposes demanding higher level of confidence, ID documents can be demanded and more complex procedures (e.g. with notaries and witnesses) can be undertaken.
- Of course, you could make an audio recording for oral declarations, but audio recorders were not commonly available and it would be too complicated if the entire contract is not read aloud in that recording.