The fact that 2nd Dimension Doofenshmirtz had no real tragic backstory and is a much more successful villain tells me that Doofenshmirtz's backstories aren't the cause of his evil, they're an inhibition on his evil.
His suffering taught him humility and empathy and perseverance that 2nd Dimension Doofenshmirtz never had. And that ultimately made him a better person, and thus a worse villain.

















