Because they are desperate or just stupid. I once dumped a partner because she didn't want to get over her ex. Eventually she got back with him, or at least she thought that and later she got dumped by her ex as well since the guy was twice her age and found someone his age to get married. Bitch got what she deserved.
Sometimes people break up because they are too young, or don't think they have a future together (not all break ups can be bad). And after some time apart, they work on themselves and fall back in love. I personally, would never get back with any of my ex boyfriends. I am in a happy relationship with a wonderful man who I want a future with. Those past dirtbags don't stand a chance. But, I know of some people who get back together and swear it's working out great. People/relationships are complicated.
It depends, sometimes it can be because people realize what they had, sometimes we don't know what we have until we loose it. In the majority of cases people get back together because they have low self-esteem, they believe they won't be able to find anyone better than what they had.
Usually because they want to have sex with someone they know, and aren't really trying for something long term... They already know it's not going to work, so there is no pressure to progress in the relationship. They get laid until the other person gets too annoying and then they cut them loose again.