Sasuke always had a long standing rivalry with Naruto because he knew that Naruto had a 'crush' on Sakura. He always wanted to get better than Naruto to prove to Sakura that he was the more reliable candidate. (Didn't really work since Sakura has a crush on Sasuke anyway. XD)
Naruto's 'crush' on Sakura was really just his way of testing Sasuke to see how he would react.