Hi,
A master plan run will created a planned purchase order there is a demand for the item.
The demand can come from either a sales order, sales forecast for that item or a parent of that item or it can come from safety stock levels for that item or a production order for a parent item.
Depending on your refilling paths and default order settings as well as stock levels you may get a planned purchase order to fulfil one of these demands.
E.g
Sales order for 10 cups. The cups are an item that you buy and then sell (set to purchase order in default order settings) therefore when master planning runs it will give you a planned purchase order to buy 5 more cups in order to fulfil the sales order completely.