Yet I bought a color laser printer and my first two pages of recommendations are for other variations on the same ("Hey, you bought the wired MFP! Perhaps you want the wireless too! And I know it's a HP printer, but maybe I can suggest some Brother toner for you!").
Still though, there could be a method to the madness. You bought a printer - are you setting up a home office? Perhaps you want a second printer for upstairs?
Also, you just bought an HP brand printer. Were you replacing a printer that just ran out of ink? Maybe THAT printer was a Brother printer. Perhaps this Brother ink cartridge can extend the life of the hypothetical printer you may be replacing...
My point is that I can contrive cases where the recommendations might make sense - not to you, specifically, but to a large enough cross-section of consumers.
Like mentioned in a sibling comment, I bet Amazon could very easily deduce that toner is sold a lot more often than actual printers.
In a perfect world for targeting sales, they will predict and show you exactly what it is you want to buy next. Repurchasing is just a very lazy way of predicting what you'll buy next.
(I find it super annoying, too; but that doesn't mean folks have figured out purchase reco's at scale)