The perfect merged with the aorist over the course of the evolution of Greek . . . and a new periphrastic perfect with εχω eventually emerged in modern Greek. I suspect that these passages are a snapshot of the merger in process.
If Justin’s Greek is like everyone else’s, I’d say the difference is exactly the same as in English. The first one says “He’s commanded you to …," while the second one says “He commanded you to …".
According to the first, it’s a standing command, still in effect. We may presume it is in the second too, but the Greek doesn’t actually say so. All the Greek says is that it was a command he gave at some point in the past. (The sentence might go “He gave that command, but next day he rescinded it and told you to eat anything you felt like eating.” Aor. not perf.)
I guess it makes sense. For the command to keep the Sabbath holy is still in force for a Christian, although it has been transferred to the following day. However, the second command has expired, since all kinds of food are clean for St. Justin.
A little searching e.g. justin martyr “sabbath keeping” exposes the complexity of the question: “What did justin martyr say about the sabbath.” It looks like it would take a lot of reading to get this sorted out. Apparently “sabbath keeping” was a part of Justin’s explanation of the divine purpose for the Torah given to the Israelites.
Here is a sample:
Justin repeatedly said that the patriarchs Abel, Enoch, Lot, Noah and Melchizedek, “though they kept no Sabbaths, were pleasing to God…. For if there was no need of circumcision before Abraham, or of the observance of Sabbaths, of feasts and sacrifices, before Moses; no more need is there of them now.”23 Justin argued that, since Sabbaths and sacrifices and feasts began with Moses, then they ended with Christ, who was the new covenant.24