This happens when one product is only available in one location, and one is only available in another warehouse. Both shipping costs are added up together, and you will likely receive your order in two separate packages.
If you purchase two products that have significantly different shapes, the order may also be split into two different shipments, such as a mouse and a mousepad.
If this happens, you can also try buying the two items separately in two different orders to better visualize the shipping fees and carriers used: