Why isn't it corporeal punishment instead of corporal punishment?
Solution 1:
While the two have once had a greater overlap in meaning (Shakespeare uses corporal were we today would use corporeal in MacBeth), the two differ in meaning more than in etymology.
Corporeal means of the body as opposed to the mind or spirit. Corporal means of the body as in paying attention to the actual individual body.
Since by "corporal punishment" we mean such punishment as flogging, spanking, mouth-soaping, amputation, branding, etc that is inflicted on the actual individual body, it falls under the second use.
The distinction was one of preference rather than firm definition until relatively recently. I mentioned Shakespeare above using corporal for corporeal, and as late as the mid 1800s we do find "corporeal punishment", but such uses were increasingly against the general trend, and now they are more firmly separated in precisely how each relates to the body.
Solution 2:
Corporal is generally used with punishment, corporeal is a more literary term with a different connotation:
Corporal is most often seen in the phrase "corporal punishment," which refers to physical punishment, like a spanking, as opposed to nonphysical punishment, like a fine or loss of a privilege. (Corporal punishment is now limited to the kind of physical punishment that doesn't do anyone in; capital punishment is the sort that results in the death of the one being punished.)
Corporeal is at home in literary contexts, where it describes what is bodily as opposed to what is not—be it mental, emotional, metaphysical, or supernatural. Corporeal is familiar in religious contexts too, where the corporeal is often contrasted specifically with the spiritual. In legal contexts corporeal moves beyond the body to describe things (such as property and money) that exist in the same physical realm that the body exists in, as opposed to the nonphysical realm of reputations and well-being and the like.
(M-W)
See also Ngram : corporal punishment vs corporeal punishment