As a result, Ted’s version of Barney was an exaggerated caricature of the “real” Barney Stinson, who may have exhibited some of those traits, but actually wasn’t the arrogant, womanizing, laser tag-obsessed douche portrayed by Neil Patrick Harris.
Here’s how the theory lays things out: because Ted Mosby spent all of How I Met Your Mother relaying his version of events to his kids in 2030, everything seen on the show must be taken with a grain of salt.
Because Ted, Barney, and Robin regularly found themselves in a love triangle through many of the show’s storylines, Ted intentionally framed Barney in a negative light so he could get the blessing from his kids to pursue another relationship with Robin after her and Barney’s divorce.