Security problems are inevitable, no matter how diligent you are. Modern systems are too complex to be perfect, and a single flaw is all it takes.
Fortunately, in many cases you don't need to be perfect. Script kiddies and other crackers are usually lazy, and there are a lot of targets out there. Unless your site has some information that is unusual or unique, most of the time you just need to be more difficult to crack than most others. The crackers will frequently move on to easier targets.