There are multiple stages inside Postfix, and each stage can be affected by configuration parameters. I have not yet found a clear documentation of the data flow, but it seems to go like this (only much more complicated) under normal circumstances:
However, when using virtual (non-system) users, internally-generated emails (e.g. mail from cron or PHP's mail() function) seem to bypass the alias mappings, which the MDA then rejects if they are addressed to an alias instead of a user.
A table from the official documentation is more detailed (the "-<" between the last two boxes in the original document is apparently intended to indicate rightward movement with a fan-out, i.e. the message may go through any of the 3 sub-boxes on the right; it has been replaced with "->" here).