Here is how you need to read the query. What you understand already is that your over clause partitions the data by warehouse. What you are not understanding is the Order by clause.
The Order by clause states that the window your aggregates acts on starts with the value in the Product table and goes back to the beginning.
Let's take the San Francisco warehouse. The first three rows have a window that includes all three of these rows since iPhone is the first value in the order by.
What is the min quantity in that window? 10
What is the sum of the quantity in that window? 260
Then look at the next two rows. The window includes all rows that have a product Samsung or have a value that is less than Samsung. That means that the iPhone rows are included in the window.
What is the min quantity in that window? 10
What is the sum of the quantity in that window? 560
Can you insert a row for San Francisco for product Samsung with a quantity of 5? If you did then this would be the results:
For iPhone the min would be 10
For Samsung the min would be 5.