The same reason some people have attched earlobes and others dangle. It all depends on your genes. MOST people, for reasons of population diversity, simply cannot whistle.
First reason that some people are unable to whistle is that these type of people are shy in nature. Second reason is that they had never tried to make whistling sound when in their childhood stage and blowing whistle is an art which is learnt after a lot of practice.
Some people can not whistle because they are having sores in their mouth or there may be painful bumps on tongue or they may have painful cracks on the lips. People suffering from mouth ulcers, burning mouth syndrome (BMS) or having misfitting denture or teeth which are having clips can't whistle.