Seems like a blend of skill, calculated risk, and luck.
Skill: Picking Josh Allen
Calculated risk: Gambling on the QB situation, hoping Josh could learn behind a seasoned vet for a year, and thinking that AJ McCarron was that seasoned vet.
Luck, followed by skill: When the gamble didn't pay off, it turned out that Josh was more ready than they anticipated. Then they stumbled into a good backup situation, and parlayed that into extensions for both backups that set the team up for the next few years.
I've said it before, I'd hate to play poker against Beane.