I am not trying to describe the happy path in any way. I have gone through a 4 year L1A green card which my colleagues got it in 10 months and I have been without advanced parole for 13 months which implied if I left the country due to any reason, I could not come back. And my experience too was in a different decade, no need for me to cover up the warts. It is quite an experience each interaction with the then INS taking over 3 months when the entire last stage should have completed in 3-4 months.
What I am describing about H1 is standard (majority) operating procedure. Yes extending H1 visa outside of the country is a pain, but extending H1 while being in US is not such a big pain, and most of my colleagues do that. Of course there does come a need for people to visit to their origin country once in a while, and yes that's when it becomes a lottery.
H1b applications processed by consulates don't receive an I-94 which means that the application is "approved pending a visa stamping". The new work authorization isn't active regardless of whether they are already in the United States legally or not, until the person leaves the US and goes to a visa stamping at a consulate.
You are describing the happy path for tech workers, but in my experience (90s Soviet block exodus) most families had to go through consular processing because it places a smaller burden of proof on the applicant vis a vis things like legal status in the United States and their home country. Lots of families from the Soviet block had a hard time assembling the required documentation in the chaos of the 90s and anyone who overstayed a H1b or student visa even a day because they wouldn't or couldn't uproot their families has to go through this process.