It's more likely that items on sale are sold at a net loss. The cost of simply having stock is more than you'd think. As an example, I ran an ecommerce site for a hardware company and after 30 days in stock laptops were no longer profitable, even if sold at full price.
My understand is that bikes have a pretty slim margin and stores make their money on accessories and servicing.
You got it just about right. Bikes now have annual updates, just like cars do. Any bikes not sold end-of-season will be worth roughly their second hand resale value the next year. Hence the stock clearance sales. This effect is stronger for racing bikes and mountain bikes than it is for evergreens (for obvious reasons). If a bike store is borrowing at 7% (good deal with the bank) to buy their stock then a $500 bike that retails for $649 (30% gross margin) will have cost the store ~20 bucks in interest after half a year. If they sell it during clearance they will probably drop the price to $549 or $499 depending on how much inventory they have to move. At $550 they're still making some money, at $499 they're losing.
And they still have to put the bike together, give it the '0' service (mostly checking if everything is tight, re-inflating tires and setting it up for the customer) and a warranty. And clean it up after every jerk that goes puddle hopping with a new bike during their test-drive, after which they won't buy it.
There is not a whole lot of money in selling discounted bikes.
Then after the first year you have hopefully a loyal customer that can't fix their own punctures and that keeps coming back over a long time for fixes and eventually an upgrade. It isn't rare for a sale to make more on accessories than on the bike itself, compared to the price of a bike a bag set, seats, lights (usually mandated by law to be on every new bike) and clothing are sold at much higher margins.
My understand is that bikes have a pretty slim margin and stores make their money on accessories and servicing.