Cost price is a bit meaningless in many cases. The “cost” of manufacture of an item that we consider does not generally include the associated costs of sales, distribution, marketting, warranty provision etc. All of these are associated with specific products, and need to be considered somewhere.
You also need to take into account corporate operating costs of accomodation, staff etc which are roughly constant, regardless of sales.
Many of these costs apply to all stages in the chain, manufacturer, distributor and shop.
You say we are being ripped off because shops mark up their products heavily? They need to pay all these costs as well as buying stock.