How does Messages work between my Mac and my iPhone?
I think the source of your confusion is the difference between traditional text messages (SMS) and iMessages (Apple's own protocol).

Messages on the Mac doesn't support SMS. Any message you send or receive on your iPhone as SMS won't show up in Messages on the Mac.

If you send a message as an iMessage, though, then it'll show up on the Mac. Now here's where it gets confusing: even though iMessages are "data" and not "text," they can be sent between phone numbers. If you've got iPhones at both ends, a "text" sent from one to the other will be sent as an iMessage by default. These messages will then appear in Messages on the Mac.