Flexbox's spacing algorithm isn't intuitive when you are first learning, but several CSS experts have written great articles explaining the math behind how growing and shrinking work.
It inspired me to build a tool I call the Flexulator for seeing how this formula works on flex items right in your browser. I built it to really wrap my head around the Flexbox spacing algorithm and how it works.
Firefox Dev Tools inspired the look and feel. They even have a Flexbox Inspector. Very helpful!