Costco has documented that they will sometimes break even or take a slight loss on their products. They make money through membership.
This is why Costco only sells the kit Macs. You can’t custom build a Mac through them.
If all you need is baseline or a kit configuration, go ahead and get from Costco.
Personally, I’m done with Costco as I’m displeased with their lack of signage, impossible layout and long lines. There is no “in and out” there. It’s a trip and a hassle. But hey, lots of people love it.