First some background: The definition of Docetism: “the distinctive thesis which gave it its name (Greek word for Docetism = to seem) was that Christ’s manhood, and hence His sufferings, where unreal, phantasmal.” (J.N.D. Kelly Early Christian Doctrines, page 141). Docetism is a very old heresy. It is mentioned in the First Letter of St. John: "This is how you recognize God’s Spirit: every spirit that acknowledges Jesus Christ come in the flesh belongs to God. (1 John 4:2). The implication being that if the spirit does not acknowledge Jesus come in the flesh (i.e. Docetism) does not belong to God.
The Early Church Fathers taught against it. St. Ignatius of Antioch and St. Polycarp both wrote against it, as did others.
As to why it was necessary for Jesus to take on a human flesh, let me offer the following: (some of the below is taken from The Mystery of Jesus Christ, A Christology and Soteriology Textbook
In the book of Genesis we read that God created man in his “image and likeness”(Gen. 1: 26) and with this creation man has been given a spiritual and immortal soul. This creation makes man a person and gives him a certain dignity that separates him from the other animals. Upon his creation, man was in a state of justice and holiness.
God placed man in the Garden of Eden, giving him all the fruit that grew in the Garden, except for the fruit of the tree of the knowledge of good and evil (Gen. 2: 16-17). Man rebelled against God by not obeying his command and thus sinned against him (Gen. 3: 1-7). Because of this failure on the part of Adam and Eve, man was no longer in a state of justice or holiness: he “lost his supernatural likeness to God and had a diminution in his natural likeness because his human nature deteriorated.” A restoration of this holiness was needed; a savior was needed to bridge the gap between man and God that sin had created. While God could have chosen other ways to effect this redemption, he chose to give man “the grace of being redeemed in the most perfect way, that is, ex toto genere justitiae, (in the fullest sense of justice).” But man, being imperfect, could not make the necessary sacrifice to satisfy the debt created by the sin of Adam in the fullest sense of justice. “Only the Man-God could make satisfaction in strict justice.” Thus God became man in the person of Jesus Christ to offer himself as an acceptable sacrifice to God to redeem man from his sin. This is the primary reason that God became man and is attested to in the Scriptures: “For the Son of man came to seek and to save the lost” (Luke 19: 10). “Christ Jesus came into the world to save sinners” (1 Tim. 1: 15). There are many other verses that attest to this as well.
Jesus’ sacrifice of himself completely atones for man’s loss of both his supernatural likeness to God and his diminution in his natural likeness that sin caused. St. Augustine, in his writings on the Trinity, notes that the one physical death of Jesus Christ redeemed man both physically and spiritually. The redemption brought about by Christ saves man completely.