I'm a former prosecutor from New York City, and that aspect of the case really hits home to me. It certainlymakes you wonder (assuming the current charges are true) whether he was also currupt while he was the state's attorney. And yes, you'd think that his time as state's attorney would give him a pretty good idea of how investigations are run, and he would have been more careful in how he engaged in corruption (again, assuming he is guilty, which hasn't been proven yet).
On the other hand, Elliot Spitzer was the Attorney General of New York State for many years, and conducted several highly sophisticated investigations, and yet he was stupid enough to patronize a call girl operation -- and doubly stupid enough to book his "appointments" over the phone.
Smart people do stupid things with amazing and astonishing frequency. That's just human nature, I guess.