why is it sometimes a Coke product and sometimes a Pepsi product?
It is a little complicated. Dr Pepper/Seven-Up, Pepsi & Coke are all separate companies. Pepsi & Coke both have bottling partners who “bottle the product” meaning they put it into bottles & cans. Dr Pepper does not have this type of bottling network so they partner with Pepsi, Coke, or another company, depending on what part of the country they are in. If you live in a place where Coke partners with Dr Pepper, you will see Dr Pepper in your Coke Machine. However, if Pepsi is the Dr Pepper partner in your area, you will see Dr Pepper in the Pepsi machine. Coke owns Mr Pibb so where they can’t sell Dr Pepper, they use Mr Pibb which is a Dr Pepper knockoff. Hope that helps.