The baker knows that hot dogs come in packages of 8 and that hot dogs are complimentary goods related to buns.
Therefore customers will need to buy an extra package of buns for every 7 packages of hot dogs. This allows the baker to sell more and thus make more profit.