How far should you take a relationship?

If you know you are going to end it with that person, then why are you with them? Just for the sex?