How did the first sexual animal come to exist?
This is a very broad field, with many complementing, overlapping, and contrasting theories. I suggest that you read this part of the Wikipedia article on this topic:

http://en.wikipedia.org/wiki/Evolution_of_sexual_reproduction#Origin_of_sexual_reproduction

Here is what I got from the Wikipedia article (this is just one hypothesis, read the article for all the others):

There are many advantages to sexual reproduction, two main ones are greater genetic variation and recombinational DNA repair (occurs during meiosis). 

There are certain species that can reproduce both sexually and asexually. They choose to reproduce sexually during times when the environment is uncertain (changing). This provides evidence that greater variation is one reason for sexual reproduction. 

Asexual organisms only have one copy of each gene, therefore if this copy is mutated in a bad way, they are out of luck. Organisms that sexually reproduce have two copies of each gene, when one goes bad, they can use the other copy to repair the original copy, during meiosis. 

As you may know, stress has many harmful effects, one being that it leads to DNA damage. There are certain species of bacteria who, in response to stress, uptake/integrate nearby bacteria cell's DNA into their own. They can then use this new copy to repair their own copy in case they experience DNA damage.

This "trait" of up taking/integrating other's DNA may have been evolutionary selected for (because these organisms repaired their DNA, they survived and passed on their genes), therefore eventually leading to organisms that sexually reproduce.