Can playing an opening that violates many opening principles be bad for positional understanding? As the title says, and I have a concrete example in mind, g5 attack against the Italian:
[FEN &quot;&quot;]
1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4. d3 h6
5. O-O d6 6. c3 g5

Which can go like this:
[FEN &quot;&quot;]
1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4. d3 h6
5. O-O d6 6. c3 g5 7. Re1 g4 8. Nfd2 h5
9. Nf1 h4

It is a really interesting opening and probably results in some beautiful attacks; however, it violates so many opening principles:

Black does not develop pieces
Black does not get their King to safety
Black makes a lot pawn moves in the opening

The reason we learn about opening principles is that they work in most situations, could playing this opening mess with a players judgement in an unknown position? Would the answer differ depending on a player's level?
Generally speaking, violating positional elements, at any time, is bad for positional understanding.  When you win a lot of games with bad positional play, this provides positive reinforcement for playing badly.
This opening, often called the Black Bear of the Philidor, isn't really breaking the opening principles.  Black has gained space on the kingside, has equal control of the center, is just as developed as white (especially considering that there's no good places to put the bishops), and the king is safe as long as the center remains mostly closed.
Great players know when to break the rules.  https://www.chessgames.com/perl/chessgame?gid=1282302