There are 2 types of restriction enzymes, exonucleases and endonucleases. Endonucleases again have their types; one makes a blunt end that cuts within the gene, and the other makes sticky ends. So for the reason of getting rid of a segment of DNA from one organism and ligating it into another, the endonucleases, which make sticky ends come in handy. It is due to the fact you can't ligate segments of DNA except if they've sticky ends.