Criminal law is based on the concept of crime and punishment. Depending on the crime, the punishments can be very severe (e.g. loss of liberty or life).
Permitting ex post facto criminal laws would allow legislatures to arbitrarily criminalize actions that were perfectly legal at the time they were committed.
Given the potential severity of criminal punishments, this just lends itself to abuses of power. Because of this, most countries explicitly disallow retroactive criminal legislation in their constitutions.
Civil law pertains to rights and duties. In this context, there are legitimate occasions where retroactivity may be useful.
Sure, retroactive civil laws can still be used to target specific entities or persons. However, the potential negative outcomes are milder (at most, the loss of movable or immovable assets).
Because of this, there is no universal consensus on retroactive civil laws. Most countries allow them; many other countries frown on them; a few ban them outright.
First, there are textual arguments. For example, why does the Constitution prohibit states from impairing the obligations of existing contracts if the general prohibition on ex post facto laws would do?
Further, in the normal course of governing, one must sometimes rearrange the rights of others. For example, to pass bankruptcy laws, one must abridge the rights of creditors. Changes to property laws necessarily alter preexisting rights, e.g. to keep people off your land or to sell it or to build a particular thing on it. Civil law is all about rights.
Which leads to the special nature of criminal law in expressing moral condemnation and imposing often-severe punishment (as opposed to the civil law requiring payment of damages). There is an element of moral humility in requiring the prohibitions to be stated ahead of time. Reasonable, thoughtful, and well-intentioned people disagree enormously on morality, but if we spell out the prohibitions ahead of time, we at least put everyone on notice as to what is expected.
Also consider that contract and tort law, being judge-made law, have an inherently retrospective component whenever new issues come before the courts, or whenever a doctrine is altered or reversed. It would be odd to tolerate this in some parts of civil law (those that are mostly judge-made) but not in others (those that are statutory).
All of which is not to say that retrospective civil laws are always right. It would definitely be immoral for Congress to pass a law tripling the tax bill for your income from ten years ago. But the Constitution is not a general prohibition against bad laws. Perhaps in this case, the ex post facto clause could be read to prohibit such practices as well, but at some point you have to rely on the legislature to get it right.