What's the difference?

What's the difference between being in a relationship and being married? I don't see the difference. People get married and they say there gonna be together forever and then years later they file a divorce and in a relationship you say your going to stay together forever then break up.