@TheChazz25
Exactly like @HomerSpinson explained above. Couldn't agree more.
The most ironic part in all this is that when they finally fixed the old method to trigger this glitch on purpose, they introduced the squad system, and during that patch people discovered how to trigger this BUG through another method thanks to the Squad System. Indeed this BUG and the class duplication glitch in GA/CS are similar, probably due to the same BUG.
People have found out how to fool the game into thinking they are using one thing when in reality they are using another thing. This way a Hero can be used, but the game will consider another hero has been picked. which allows another player to get the same Hero. The same with classes in GA/CS, the game will think you're using an armor class when picking a Hero for example, and then it won't reduce the remaining available Heroes to be used by your team.
I can't say this is the only method to trigger class duplication in GA/CS, but I've seen footage of this one working. In HvV is a very easy glitch to perform, I have done it myself for testing purposes several times since the patch which fixed the old method.
For reference, the old method consisted of pressing the button to go back to Hero Selection Screen as soon as your respawn timer reached 0. This would fool the game into thinking you deselected your hero because you pressed the button, but instead of taking you onto the selection screen it would spawn you with your previous Hero, which would be available to anyone coming back to selection screen from that point onwards. They fixed this one around a year ago.