Is it legal to copy moves throughout an entire game?

It is legal, but bad. Black cannot maintain symmetry.
1 e4 e5 2 Nf3 Nf6 3 Nxe5 Nxe4 4 Qe2 Qe7 5 Qxe4 Qxe5 6 Qxe5 wins for white
1 d4 d5 2 c4 c5 3 cxd5 cxd4 4 Qxd4 Qxd5 5 Qxd5 wins for white
Of course your opponent is allowed to make whatever (legal) moves he wants! There are no legal or ethical reasons why not. As others have already pointed out, if Black keeps copying White's moves, but one step behind, he is likely to get in trouble--providing that White plays well,
It's very hard to understand why "i just gave up and let him have my queen to see what he would do." Would ever be a reasonable plan!
You game is a very instructive example of why it is so dangerous for the second player to keep imitating the opponent's moves. You had two opportunities to get a winning material advantage because your opponent imitated you one move too far! But you missed both of them. Since you are a relatively inexperience player, this is a good time to learn this lesson: Pay Attention
Surely in daily chess it has to be illegal if you get two games one with the white pieces and one with the black pieces against the same opponent and they copy your moves with the white pieces with their white pieces and the same with the black pieces so you're effectively playing yourself.

The scholar's mate is proof enough that copying moves doesn't work. After 4 moves you can't say "I get to checkmate you next" because the game is over. Also if your opponent checks you, that cannot be copied because you have to get out of check. Best case scenario is that you will always be one step behind, which will eventually lose no matter what the moves are.

It's good for White because you can mate her one move before she can mate you.