The false ego is born because of misuse of independence.
In the beginning, from clear consciousness, or the pure state of Krishna consciousness, the first contamination sprang up. This is called a false ego, or identification of the body as self. The living entity exists in the natural state of Krishna consciousness, but he has marginal independence, and this allows him to forget Krishna. Originally, pure Krishna consciousness exists, but because of the misuse of marginal independence, there is a chance of forgetting Krishna. This is exhibited in actual life; there are many instances in which someone acting in Krishna consciousness suddenly changes. In the Upanishads, it is stated, therefore, that the path of spiritual realization is just like the sharp edge of a razor. The example is very appropriate. One shaves his cheeks with a sharp razor very nicely, but as soon as his attention is diverted from the activity, he immediately cuts his cheek because he mishandles the razor.
Not only must one come to the stage of pure Krishna consciousness, but one must also be very careful. Any inattentiveness or carelessness may cause fall down. This fall down is due to a false ego. From the status of pure consciousness, the false ego is born because of misuse of independence. We cannot argue about why false ego arises from pure consciousness. Factually, there is always the chance that this will happen, and therefore one has to be very careful. False ego is the basic principle for all material activities, which are executed in the modes of material nature. As soon as one deviates from pure Krishna consciousness, he increases his entanglement in material reaction. The entanglement of materialism is the material mind, and from this material mind, the senses and material organs become manifest.
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Third Canto, Chapter 26 – Text 24