It's not that the body = bad, rather it's just realising that you are not it. The human body is an amazingly designed machine that can self reproduce and self repairs, etc. (as long as it's not too badly damaged):The Bible does indeed teach on Body, Soul and Spirit, but not quite in the way you envisage (which is much closer to Platonic ideas of “Spirit=Good” “Body=Bad”).
Don’t forget that before the Fall, Adam was a tripartite being, complete with a body that God declared “very good”...
TWH, 3:31 The human body is nothing more than a very sophisticated (by human-standards), organic living
computer, that self-reproduces and self-repairs (if it is not TOO badly damaged). It is a combination
of smaller computers, e.g. brain; kidneys; liver; etc., collectively making up the whole, pre-
programmed to have selfish animal-instincts, that your soul has to learn to overcome. The physical
human brain operates the body and its emotions, but your mind and its feelings belong to your soul.
That is why Jesus said that the flesh is worthless, and that it is only the spirit (soul - the REAL you)
that has value (John 3:6 & 6:63).
But as wonderful as it is, the human body is at the same time the evidence of the Fall. -
"The human body, wonderful as it is, is in reality the evidence of man's disobedience. It is unsanctified flesh, diminished in Spirit; "dead" in sin. The result of Satanic power, it is the medium through which he acts. The carnal man is at enmity with God - Romans 8:7-9*. Man, left in that power would progressively become more evil in all his ways, with the violation of the body and its utter debasement being the delight of the creature for its new master - Satan.
* Romans 8:7 Because the carnal mind [is] enmity against God: for it is not subject to The Law of God, neither indeed can it be.
8:8 So then they that are in the ways of flesh cannot please God.
8:9 But ye are not of the flesh, but of the Spirit, if so be that the Spirit of God dwell in you (Gal. 2:20). Now if any man have not the Spirit of Christ, he is not his.
This is the complete denial of the "I AM"'s role for man and woman, and the fidelity and honour they are called upon to give their bodies, created Temples in which the very Breath of Life was placed. Unless this "unclean" body is cleansed and its "nakedness" covered by the "redemption that is in Christ Jesus" it is without hope. That is why Christ said to Nicodemus that he must be born again as his spirit-being or he would never see the Kingdom of God; as is recorded in the Gospel of John ch. 3.
In order to bring the sinful human body, to the nearest approach to its original "very good" state, Divine Law was given. In obedience before the Fall, husband and wife were as one body, indivisible. In obedience afterwards, when the individual accepts "the redemption that is in Christ Jesus" then husband and wife are again as one body, indivisible."
Source:"This Is A Great Mystery: Marriage Guidance"