Why 1 megapixel is always 1024×1024?

A CCD can be square one or rectangular. And its size is represented by M×N. So for 1 megapixel there are 1024×1024 pixels. If it’s square or rectangular it will be some multiple of this number. I want to know why this particular number and why we cannot simply use 1000×1000 pixels.