Different era. The Democratic base of the '90s and early aughts was more willing to tolerate compromise for the sake of perceived electability.
Also, I believe it was established that Bartlet won his first election in a 3-way-race with less than 50% of the vote, along the lines of Clinton's first victory, plus he had a Republican Congress and was forced to compromise his liberal principles quite a bit as a result. Given that the GOP didn't put up a particularly strong opponent for his re-election, I can buy him getting re-elected, especially given that he did accept censure over the MS scandal.