Why did this guy lead me on when he had a girlfriend?

He didn't tell me he was engaged to his girlfriend. But continued to text and flirt with me, and telling me he likes me etc.
Why did this guy lead me on when he had a girlfriend?
Post Opinion