email – If sending mail using mail server configured for subdomain, can reply/from be set to parent domain?

I’ve setup setup a SMTP provider to use a subdomain mail.foo.com, and I’m running another existing mail service for users on foo.com. When sending out via the SMTP service which is configured on mail.foo.com, does it make a difference to mail deliverability if the FROM or REPLY-TO address of my emails is bar@mail.foo.com or bar@foo.com ? I seem to be able to delver mails through the SMTP service fine with FROM address for either sub or parent domain.

Having replies go to an existing mail user on my existing other service would be nice, but I’m not quite understanding how it’s possible to deliver mail for ‘bar@foo.com’ when SMTP service is setup specifically for mail.foo.com.

Thanks!