Both Lowes and Home depot bring their lumber inside where it dries on the shelf. When you take it back outside it absorbs moisture, temperature changes and, because this happens only on the surfaces, it warps.
This is especially problematic with deck lumbers,
I generally buy from Menards now who stores framing materials outside or in unheated buildings. A year ago I bought treated lumber for the new fencing and decks. Both projects have been delayed. The material is outside in the weather and none of it has distorted.