Short answer: uneven piping, oven hot spots, or a tray that isn’t level.
Wonky shells usually trace back to airflow and evenness. Pipe straight down, holding the bag vertical, so each shell is even and round. Fan ovens can blow the feet to one side — try rotating the tray partway, or baking on a lower fan setting. And check the obvious things: a level oven shelf, a flat tray, and trays that aren’t warped. Doubling up trays can steady the heat too.
Related:raspberry French macarons · glossary:macaron feet.