They both think they're entitled to get elected to political positions in the future.
Olmert has corruption charges. Spitzer was lucky that he wasn't. In addition to his prostitution scandal, he had used troopers to spy on a previous political rival.