In theory, that’s the goal of mastering.
Even if you had a live band in a studio, the type of microphone you use and their placement will have a huge impact on the recorded sound. That’s the recording engineer’s job.
All those microphones will be recorded separately whether the recording was made live, or as is more common in popular music, one instrument at a time. At the very least the levels of each of these tracks must be adjusted. Depending on whether you’re aiming for realism or not you may want to add some effects like a bit of artificial reverberation and you may want to adjust the equalisation. That’s mixing.
You’re not done yet, though, because although after mixing you should have a stereo recording fit for playback, it’s not really yet. If you’re making a vinyl record, you’re definitely not done yet. One of the problems you have is that mixing is done on a song basis, so at the very least you will have to splice those songs together to make a record. You will have to adjust the levels and EQ of each song so that the record doesn’t go LOUD quiet. On an LP record, because of the spiral shape of the groove, inner tracks will be shorter and thus high frequencies will be dulled out. This must be accounted for. CDs don’t have this problem, but the low noise floor makes small flaws in the original recording more noticeable. If possible, these must be corrected. All of those final touches are mastering.
Nowadays, mastering engineers tend to work on “stems” rather than a monolithic stereo (or mono) mix-down. The mixing engineer will instead take a large number of tracks and mix them to “stems” or groups. You then have, for instance, all the percussion tracks mixed to one stem, and all backing vocals to another, and guitars to another, and so forth. In this sense, mastering engineers now do some of the work that mixing engineers used to do.
Re-masters were, and to some extent are still, important because when everyone moved from vinyl to digital, most CDs were made by playing mint-condition vinyls and just recording that. These records were not properly mastered to take into account the qualities of the new medium and as a result they sound much less good than they could. When you do a re-master, you ideally work from the original magnetic tapes, which have much higher quality than the final vinyls. Hence, the re-masters can be much closer to “how it sounded in the studio.”