Agreed with the pushing boundaries theory, but, like most things in life, there are numerous interchanging explanations.
For me it's three fold, the other two (main) reasons being: a) they need some drama in life, it adds to their sense of purpose and provides gossip material and; b) they are testing manliness in the form of our own reactions.
There are other contributing factors to behavioural challenges, like hormonal fluctuations and psychological dysfunction and or distress, though those things are largely out of their sphere of control.
The only reaction that's ever needed is the bratty little sister treatment; unless of course they are genuinely upset, then either leave them alone or go full emo-sponge (momentarily) - i.e. protective big brother mode.