He opened up about because he was tired of paying people off to keep it a secret. Only he and the people he was involved with at the time know if he told his sex partners in advance.
Supposedly he's paid over $10 Million in hush money over the years. Financially he wouldn't be able to keep that up forever.
As for infecting others no one as of this time has stepped forward claiming Charlie Sheen gave them HIV.
Historically when celebrities or politicians are aware that some secret of theirs is about to go public they're often advised to break the news themselves. In other words get out in front of it.
It's "Crisis Management 101".