So, you don't think God knew that when He gave His commands?
That is not the point. The point is that the Scriptures declare in no uncertain terms that at least in theory a person can obtain eternal life as a result of his own works or deeds. And since it is theoretically possible that can only mean that all people must have the ability to obtain eternal life in that way.
Clearly, He dId, and that means He does give people commands that are impossible for them to do.....while in the flesh.
Romans 8:3-4 For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh: 4 That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit. 5 For they that are after the flesh do mind the things of the flesh; but they that are after the Spirit the things of the Spirit.
When Paul speaks of walking after the flesh he is speaking of living a self-centered life. When he speaks of walking after the Spirit he is speaking about living a God-centered life. There is nothing that is sinful about a person's flesh or his body. Let us look at the following verse:
"That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit" (Ro.8:4).
Paul speaks about that same principle in the verse which follows:
"For they that are after the flesh do mind the things of the flesh; but they that are after the Spirit the things of the Spirit" (Ro.8:5).
We can also understand that it is indeed possible for a Christian to walk or live after the flesh because Paul tells Christians that if they live after the flesh they shall die:
"For if ye live after the flesh, ye shall die: but if ye through the Spirit do mortify the deeds of the body, ye shall live" (Ro.8:13).
The "death" spoken of here is in regard to the "life" which Paul speaks of here:, that "we should also walk in newness of life" (Ro.6:4) so that "the life also of Jesus might be made manifest in our mortal flesh" (2 Cor.4:11). So if a Christian lives a self-centered life any newness of life which they once had will die or cease to exist.
The second part of verse 13 is telling Christians that if they mortify the deeds of the body they will live. Christians are already received eternal life so Paul's words there are also referring to walking in newness of life.