If you take the ferry direct from HKIA to Macau then you don't pass through Hong Kong Immigration, but do that when you alight in Macau. Note that there are only a handful of ferry services a day from the Airport direct to Macau. Whereas if you head into Hong Kong city and do the walk from Hong Kong Station, there's a ferry every 15mins or so.
As per Mals advice, you don't need to (and I think only CX passengers can anyway) check your bag through to Macau. But at the airport there's a Macau ferry transfer desk where you can buy the ticket and give them your baggage receipts to go collect your bags. Then I think you hop on a bus that takes you out to the ferry.
I've never done the Macau to Airport direct thing myself because the ferries are always at awkward times to get the flights I needed. So I'd usually just go from Macau to Hong Kong then catch the train out to the airport. Its a little bt more expensive but much more practical in terms of time - even with all the repeated immigration processes.