Doesn't each architecture essentially go through the most basic commands in the same way?
For the most part. But those basic commands are represented or implemented differently. The C compiler is responsible for making sure that the correct representations and implementations are used.