It was a few things. Sampras went into the 1997 US Open as the overwhelming favourite, but lost to Korda in the Round of 16. After Rafter won the 1997 US Open, many saw him as some lucky "one slam wonder", particularly John McEnroe, and Sampras produced a brilliant performance to beat Rafter in Davis Cup soon after. Sampras was clearly annoyed not to have won that 1997 US Open, having been in such good form beforehand, but admitted that Korda had played a brilliant match on the day.
Fast forward to the North American summer of 1998 when Rafter and Sampras meet in the 1998 Cincinnati final, and Rafter wins 1-6, 7-6, 6-4, and there's a controversial call right at the end of the match. Sampras was very annoyed and let his feelings known. Sampras later made his "10 Grand Slams" comment to describe the difference between himself and Rafter. Rafter accused Sampras of showing a lack of respect, and said something to the affect of "that's why I try to p*ss him off as much as I can".
They then met in the 1998 US Open semi finals, a big match. Sampras was leading 2 sets to 1 but Rafter doing well in the fourth set, when Sampras got injured, and Rafter won in 5 sets, and went on to win his second US Open title. Sampras was rumoured to have said soon afterwards "Seeing Rafter with the US Open trophy makes me feel sick".
Fast forward to 1999, and both Sampras and Rafter say that they have patched up their differences, and the former hostile air between them had gone. They seem to have gotten on ever since. I remember the rivalry because Sampras had never been so openly rattled by a tennis rival like he was by Rafter during that North American summer of 1998. Guys like Agassi, Becker and Ivanisevic never rattled him that much.