How familiar are you with how manufacturing works? A BOM (bill of materials)/COG (cost of goods) cost !== the retail price. You have things like NRE costs (i.e. what it costs to pay people to design and bring the thing to mass production, machines you have to buy/manufacture to support your assembly lines, marketing, legal, etc etc) and profit margins to factor in. Apple's 20-30% is rare and PC margins are closer to 2-5% (often even negative for Android phone manufacturers as they try to recoup that through revenue sharing on the software side with Google).
Basically, BOM/COG is things you pay for that you pass on directly to the consumer. However, the retail price has to cover a bunch more than that so you can't compare the two directly. A good rule of thumb is ~2-20x markup depending on the profit margin you are targeting.
A $2 licensing fee in the BOM is thus probably closer to ~$14-40 retail. Considering how thin profit margins are, 3% of retail going to nothing but marketing is not nothing especially considering that Apple doesn't have to pay this fee and also getting a cut of every product you sell to boot. Think about it this way - frequently towards the end of the development cycle as you're heading towards mass manufacturing, companies will look to shave tens of dollars and be trying to find 10-20c here & there to add up to that. $3 is massive.
You see similar dynamics with MFI. It requires a special chip (space within the product, battery costs) and licensing fees (Apple gets a cut of every sale you make making your competitor product more expensive or less profitable). It's why none of the major tech companies have MFI in their products AFAIK. It cripples any competitor product you try to make (not to mention that you're further at Apple's whims around licensing agreements changing if you build your product around MFI).