In your first example, white and black both violate the hell out of opening principles. Specifically, do not make excessive pawn moves and activate your pieces. A grand total of 1 piece is moved in your first example, and that is not even until move 6. Opening principles would have fixed the problem for both of them (and QGA is a perfectly acceptable line for both sides).
Your second example is a logical flaw that is also avoided if opening principles are followed. Specifically, you do not try to hold onto a gambit pawn at the expense of your own development, and you tend to develop knights before bishops. Incidentally, it is the former that makes the Queen's Gambit a misnomer (since the pawn is not really sacrificed, but rather the trade delayed).
paragraph 1. e3 is fine 3.a4 is best move according to stockfish. 2...a6 is a blunder by black but is played commonly by patzers and on the face of it looks reasonable just actually bad. keep in mind i stated that this is a scenario for 800-1000. these people aren't that good.
paragraph 2: just to point out i'm aware that the queens gambit is not a gambit but people who don't revise openings don't know that. and b5 is fine in terms of principles because in the kings gambit (i know it's a different opening but my point still stands) g5 is a common move therefore b5 shouldn't be seen as not obeying principles (just bad in the long run). developing bishops before knights suggests that Bishops openings is bad, caro-kann is bad as Bf5 is used in the opening before a knight is developed. the french winawer should also not be played as that develops a bishop before a knight. modern fianchetto openings are bad because they develop bishops before knights. it's the case most of the time but not all of the time. therefore that move can be overlooked as not obeying opening principles.
tactics are more important but openings should still be revised.
Here is a true example of where not knowing opening theory *might* hurt someone who is a decent tactical player, has basic understanding of chess, etc.
In both cases, black just equalizes the game, and the better player will win. White played natural, logical, tactically safe moves that just turned out to not be the best ones, and notice how it doesn't leave white much worse or anything.