A priest is required for the sacrament of Communion, but is not strictly required for baptism. In an emergency situation, I could baptize someone, but do not have the ability to change bread and wine into the body and blood and give them our Lord in the Eucharist. Presuming that the layperson knows the correct terminology/intent and has the correct matter for administering the sacraments in question, why is there a restriction for one and not the other?
In short, because that is how Christ wanted it. We can only speculate about the reasons confection of the Eucharist is reserved to priests while baptism can be done by anyone in extraordinary circumstances.
One reason might be that baptism is much more essential to our ultimate salvation than is the Eucharist. Although baptism is not absolutely required, it is normatively necessary. The Eucharist, on the other hand, is a great gift and extraordinary help to salvation; but it is not as necessary to salvation as is baptism. Indeed, baptism is so important that it is the gateway to the other sacraments, including the Eucharist. Because of its extraordinary importance, it may be that God wanted it to be as widely available as possible, to the extent that it can even be done by non-Christians in a life-and-death emergency.
The Eucharist is also the body and blood of Christ. As such, it is of utmost holiness. Just as the Ark of the Covenant, the holiest reliquary of ancient Israel, was protected through limiting access to it to those specially designated by God to care for it, so too the Eucharist is protected through the rules that surround its confection and care.