By commanding Abraham to kill his son, god commits the very wrong he's trying to "condemn". God thereby normalizes the behavior first. Abraham experiences the permission and instruction to kill someone, which could create confusion, desensitization, and/or mixed signals. That's a whole other debate...
The angel stopping the slaughter at last second doesn’t erase the initial directive given by god.
@Tsar_Martyr Then God said, “Take your son, your only son, whom you love—Isaac—and go to the region of Moriah. Sacrifice him there as a burnt offering on a mountain I will show you.”