The consumer staples sector, as measured by the XLP ETF, gained 1.39% in the current session due to a significant defensive rotation in the market. Investors are moving away from high-growth technology and semiconductor stocks, which are experiencing a broad sell-off, and into safer, non-cyclical sectors. This flight to safety has benefited consumer staples, which are known for their stable demand regardless of economic conditions. The positive performance of major holdings like Procter & Gamble reflects this shift in investor sentiment.