I grew up in Kirkland, where the first Costco is located. The hot dog sales started out as just a guy with a cart with a dog and bun steamer and a cooler with cans of pop. I can attest, it was $1.50 then, just like now. It’s all marketing and it will never change. One of their “problems” is customers don’t go enough often so they have all these little things so that you could more often. The same thing with gas, they don’t care about losing a little money/giving a discount, it’s only about getting you inside the store more often.
There’s a Costco right across the overpass from my apartment, and now that I’m WFH I go in for the $1.50 hot dog at least 3 times a week. Cheaper than my work’s cafeteria, and I’m not even a Costco member! Yes, it’s one of their “signature items” they refuse to raise the price on. Another is their cooked rotisserie chickens. They lose money on them before they even cook them in the ovens, but they get people in the door.