It's not totally accurate on the way draft boards are built.
People imagine that teams have like 300 draft eligible players literally ranked 1 through 300. They don't. Most teams have boards with between 120 and 150 players. And they do differ. In some cases drastically. There are the short board teams (the Pats are 1) who typically have fewer than 100 players on their board. I actually suspect, based just on some of their drafting method, though I don't know that the Brandon Beane Bills fall on the smaller side draft board wise.
I would say the "consensus" point among draft boards differs each year but on average the first 30-40 players are closer to a consensus. But even then... Seattle thought LJ Collier was a first round pick. The Patriots thought Cole Strange was. The Saints thought Payton Turner was. These strange picks happen because the consensus is much less than I think some fans imagine.
There are all sorts of reasons a guy who might be a consensus top 40 player might not be on an individual team board. The most obvious is injury. The same guy might have an injury assessed by three teams. The first might decide it is not sufficiently serious to change their grade. The second might decide it is sufficiently serious that they downgrade him. The third might feel even more seriously and remove him from the board entirely.
The second most obvious is character. There are the obvious red flags.... Joe Mixon is in the news today (his career might be over) and his was a sufficiently serious red flag he was off most boards the year he came out. Other players won't have DV issues, or drugs issues, or firearms issues.... but might just be a bad character fit. I talked recently in another thread about the Bills and Geno Smith in 2013. Buddy Nix, Russ Brandon, Doug Whaley and Doug Marrone and Nate Hackett as the brains trust flew out to West Virginia. Wined and dined him, spent a day with him and said "no way we can pick this young man." He went from being their presumptive 1st round pick to off their board entirely because his character (immaturaty, lack of preparedness) turned them off. Teams meet players at the shrine game, the Senior Bowl, the Combine, pro days, top 30 visits.... a player who interviews badly can be off a board.
The third reason is scheme fit. Some of these are obvious ones - a smaller, college OLB who is just a pass rusher and can't hold his own with his hand in the dirt at the point of attack and isn't good enough in coverage to transition to an off the ball linebacker spot is not likely to be on the board of any 4-3 team. To a 3-4 team though if that guy can be a situational pass rusher he might worth a day 2 pick. The guy I always go to for this example is Terell Lewis who the Rams selected in the 3rd round in 2020 out of Alabama. I was told by someone I sometimes converse with about the draft who was a scouting intern for a team that plays a 4-3 and has been pretty successful in recent years (and is not the Bills) that the GM of the team in question told him "Lewis is worthless to us." He has ended up not being a particularly good player and was cut by the Rams midway through this year but that is not the point. To one team he was a 3rd round pick. To another they wouldn't even have taken him as an UDFA.
But the 4-3, 3-4 linebacker example is only the tip of it. Take the Dolphins who (until firing Josh Boyer) played their corners in more man to man than anyone in the league. Corners who are zone only guys will have been totally off their board. There is no point devaluing them because it doesn't matter if they have taken Martin Emerson (Browns picked in round 3 last year) in round 3 or round 7. If he can't hold up in man he can't play in their defense. Or take Tyler Smith - considered by some a reach when the Cowboys took him in round 1. He had a very solid rookie year playing some tackle and some guard but he was only a fit for a power based man blocking scheme. You'd have never seen him go in round 1 to a Shanahan style offensive team. He lacks the requisite lateral quickness to effectively operate in a stretch zone. Some teams running that style of offense may have had him on the board, but downgraded, many will not have had him on there at all.
And finally there are those guys that don't meet physical profiles. Some teams are more stringent on this than others. We know the Bills have a specific thing about DB arm length. Tackle arm length is the one I run into most when speaking to people. Others only want receivers who can run a certain speed. Those physical profiles are less reasons to take guys off boards (though they will sometimes) but more reasons to devalue guys on the board. And certainly once you get past the first 40 or 50 picks that can mix draft boards up some.
And then you have the wildcard decisions... and the Bills made one of those with AJ Epenesea. I would love to sit down with Beane and honestly ask him when they turned in the card did they already know they wanted to strip him down and rebuild him from a college power rusher to an NFL speed rusher. Or, remember it was a covid year no combine etc, did they just realise when they got him in the building that he was not what they thought they were getting and have to pivot to plan B? You get those position / style change moments sometimes where a team will decide they have seen something different in a guy and it affects the value.
So I tend to reject the "draft is just a crapshoot" argument. It is not a science, not at all, but it is a place where the good teams can significantly separate themselves. The Bills drafted pretty darn well (among the league's best) 2017-2019. They have drafted less well since. They need a strong draft soon or their best guys will age out and the replacements will not be in the building.