William Shedd explains it as follows:
Adam was holy by creation, but not indefectibly and immutibly so. The inclination of his will, though conformed to the moral law, was mutable, because his will was not omnipotent. When voluntary self-determination is an infinite and self-subsistent power, as it is in God, the fall of the will is impossible. (James 1:13) But when voluntary self-determination is a finite and dependent power, as it is in man or angel, the fall of the will is possible. A will determined to good with an omnipotent energy is not 'subject to change'; but a will determined to good with a finite and limited force is so subject. By reason of the restricted power, of his created will, Adam might lose the righteousness with which he was created, though he was under no necessity of losing it. His will had sufficient power to continue in holiness, but not so much additional power as to make a lapse into sin impossible... God created man with relative perfection, or the possibility of sinning, for the purpose of placing him in probation. The object of this probation was that Adam, by resisting Satan's tempation and persevering in holiness, might secure by his own work indefectibility or immutable perfection. This was to be an infinite reward for standing the trial of his faith and obedience. God did not place Adam in a state of probation from mere curiosity to see if he would fall or from malevolence to cause him to fall, but from the benevolent desire that Adam, in the exercise of the ample power with which he was endowed, might merit and obtain as the recompense of his fidelity a final and everlasting deliverance from the possibility of sinning. The possibility of sinning is in itself an evil. It is one of the perils of finite freedom. To be delivered from it is an infinite and eternal good.
Footnote by W Shedd:
The possibility of sinning must not be confounded with the tendency to sin. The possibility of sinning is merely the power to orginate sin ex nihilo by the act of self-determination. The tendency to sin implies that the originating or self-determining power has been inwardly exerted, though it may not have been externally. A tendency to sin is an inclination to sin. It is a propensity of the heart and a disposition of the will. The possibility of sinning is innocent; the tendency to sin is sinful.
quote from Dogmatic Theology vol 2