Why do you think Gregor changed in to an insect in The Metamorphosis?
In Franz Kafka's The Metamorphosis, the main character, Gregor Samsa, wakes up one morning to find that he has been transformed into an insect, specifically a dung beetle.
To me, it seems that this happens in order to symbolize the low state that Gregor has reached in his life. In his job, he works long hours as a traveling salesman; he must wake up at 5:00 every morning, rush to catch a train, eat tasteless food, and endure a nasty boss. At home, he has a difficult relationship with his father (much like Kafka himself). He loves his sister, but he is unable to help her with her dream of studying at a musical conservatory.
His life is colorless, dull, boring; to make matters worse, he is "chased" by his boss and by his father. In other words, his life is no more interesting or pleasant than the life of a dung beetle. He eats, he sleeps, he toils, and he tries to crawl away from his enemies.
Concerning Gregor's waking up an insect in Kafka's The Metamorphosis, I'm afraid there's no answer to your question. The story is ambiguous concerning this point. There is no explanation whatsoever about why the transformation occurs. Any explanation for his transformation is speculation only.
Of course, the omission is purposeful. If the narrator reveals why the transformation occurs, the focus is shifted to the cause, and, apparently, that isn't Kafka's purpose. The story isn't about what Gregor did to deserve this, or what someone did to him to persecute him. It is about alienation, or, depending on how one interprets the story, at least it is about what happens to Gregor after he is transformed.