How does shipping work for compounds that are legal in some states, illegal in others

Take a compound like kratom, it is legal in some states and schedule 1 in other states. Same with something like etizolam.

How does shipping a compound like this work? Does flying in the airspace over a state that has prohibited it break any laws? I would assume a mail truck driving through Tennessee (a schedule 1 state) while transporting a small package from Pennsylvania to Mississippi (both legal states) could cause issues, but I doubt a mail truck would make a special trip just to avoid Tennessee.

Point being, with various research chemicals or things like kratom legal in some states but illegal in others, how does that affect shipping?

Shipping and transport from the Safety Data Sheet for ETIZOLAM.
Etizolam SDS

Section 14. Transport Information
DOT Proper Shipping Name: Toxic solid, organic, n.o.s. (Etizolam)
DOT Hazard Class: 6.1 POISON
UN/NA Number: UN2811 Packing Group: III
ADR/RID Shipping Name: Toxic solid, organic, n.o.s. (Etizolam)
UN Number: 2811 Packing Group: III
Hazard Class: 6.1 - POISON
ICAO/IATA Shipping Name: Toxic solid, organic, n.o.s. (Etizolam)
UN Number: 2811 Packing Group: III
Hazard Class: 6.1 - POISON IATA Classification: 6.1
Transport in accordance with local, state, and federal regulations.
When sold in quantities of less than or equal to 1 mL, or 1 g, with an Excepted Quantity Code of
E1, E2, E4, or E5, this item meets the De Minimis Quantities exemption, per IATA 2.6.10.
Therefore packaging does not have to be labeled as Dangerous Goods/Excepted Quantity.

So no problem shipping by land, needs to have HAZMAT certification and some/many shippers won’t accept Poison 6.1 materials. And if shipped by Air, it will go Cargo Aircraft Only (Poison Haz Class 6.1 is forbidden from passenger aircraft) and in small quantities, does not require labeling, it still must be certified as Hazardous Materials.

I don’t see where this is illegal in any form.

Safety Data Sheet for Kratom (pdf)

Section 14, transport, shows item to not a dangerous good/unclassed, for shipment by land or air.

So no shipping restrictions based on the item’s characteristics.

Yes but if you buy etizolam which is legal in PA and SC, but illegal in VA how does shipping work?

Say it is manufactured in PA, and the buyer buys it in SC. The mail will have to travel through VA, which would be trafficking a controlled substance.

I only addressed the shipping. Legality is unknown to me - have a reference?

Shipping per my answers is perfectly legal. You seem to talking possession. I have no stake in that. Think alcohol - there are still dry counties that trucks pass through everyday. Cities, counties, states do not have appreciable power over interstate transportation beyond road tax, fuel tax, license and vehicle standards.