Why CSS layout breaks focus order
Focus follows the DOM, and modern layout tools deliberately decouple the visual arrangement from it. Flexbox order, grid placement and absolute positioning all let you show elements in an order the source does not have.
For a sighted keyboard user the result is focus that appears to teleport: it moves from the top of the screen to the bottom and back for no visible reason. The fix is almost always to reorder the DOM to match the intended reading order and let CSS handle presentation within that — not to patch it with tabindex, which compounds the problem.
A positive tabindex is worth calling out separately: any value above zero pulls that element ahead of everything with tabindex="0" or none, across the whole page. One stray tabindex="1" reorders the entire document.