It sounds like you’re talking about a pull-up 2, which is one of the least effective shots in basketball (0.79 PPS), likely because human nature is to drive until you’re contested and then you end up with a contested midrange jumper off the dribble.
(link)
https://shottracker.com/articles/analytics-shot-selection
I get everyone’s frustration seeing guys barrel down the lane into 2-3 defenders and then throw up some garbage, and the obvious question is why did he do that, but the likely better answer is for the player to kick to an open guy (those 2-3 guys should’ve been guarding someone) for a catch and shoot, or secondary drive, rather than to try and take a 15 footer on the move.
Nonetheless guys are going to make miscalculations and think they can get all the way sometimes and end up being wrong. I know I have tried to pull off shots on the golf course that I thought were a good idea and ended up biting me in the butt plenty of times