It's genetic. Same reason people become brown-eyed.
It is not necessarily a genetic thing. No research has determined yet what causes some individuals to be left hande and what cause others to be right handed. If you are right or left handed, you can actually train yourself to be the other if you want by not using your dominant hand and using the other. It, of course, will be tough, but if you keep at, you can do it. After a ling enough period of time, you may not even feel right doing things with the hand that was previously dominant. It's all about stimulating the neurons in the non-dominant hand that wer not previously being used.