Focus. If you ask me, Sampras was always focused on tennis. He was not sidetracked, and perhaps because his personality did not attract it, all the media attention. Sampras was dedicated to tennis his whole career. That focus carried itself into his matches with Agassi. He was more experienced at winning the big matches on the big stages and had the confidence that comes with that.
In addition, Sampras had a better game for hard courts. The movement, the serve and the forehand. Agassi did have some great wins against him and was a difficult match up but the focus, champion's mentality and aggressive game of Sampras was too difficult to overcome more often than not.