The code was secure, but not the implementation. Microsoft also had to face some problems with its PPTP system. It was yet another case of secure codes being implemented insecurely. Security systems are complex systems, and will probably always remain so. While it can be tempting to rely on impressive numbers, buzzwords and company names to choose a good security system, that's just not enough.
Security systems require expertise and continual diligence.
There's no magic solution for security. It's just a matter of constant work. If you keep ahead of the game, you'll probably be okay.