THE NFL DOESN'T DRAFT 18 YEAR OLDS!
If the NHL waited until a kid was 21 to allow them to be drafted, you wouldn't need a lottery because you have a much clearer picture which guys had a better shot at making it.
and if you want to say MLB, hey you can't even trade a draft pick in that league.
This literally has NOTHING to do with why certain leagues have a lottery and others don't.
First lets get to WHY there would be a lottery at all? A Lottery is put in place to discourage tanking, and keep the integrity of the game in tact.
The MLB's draft is purely prospect based, and the players themselves have options. If they're A High School kid, they hold the threat of college over their heads for a higher signing bonus, and if their a Junior in college, the same thing applies. They usually don't have a huge amount of options should they forgo 2 draft selections and make it to their senior year in college, and they're all but forced to sign regardless. Only high picks have any leverage.
In the NFL there is no lottery simply because there isn't a need. The NFL only has a 16 game schedule which often results in multiple, if not many teams being tied with the same records. The tie breaker is strength of schedule, where the team with the weakest SOS gets the higher pick because that shows they're the worse of the teams tied. The NFL season usually boils down to 1 team being the clear cut worst, usually around 2-14 or 3-13, then multiple teams being tied with the same record from 4-12 all the way to 9-7.
The NBA and NHL given the amount of games played, it's actually pretty rare to see a team with the same exact record. This could encourage a team to not field the strongest team possible in hopes of being the worst team and gifting them the #1 pick. If they aren't guaranteed it forces them to weigh the options of potential fan and $$ loss or a CHANCE at the #1 pick.
One of the most interesting ideas for changing the way the draft is run was done by Bill Simmons, it's a complete change, and it involves a wheel, but basically it locks each team in to a certain draft slot every year for the next 30 years. It's actually kind of intriguing to think about, but it will never ever happen.
But the notion that the NHL uses a lottery because they're drafting 18 year olds, while the NFL gets 21-22 year olds really doesn't make a connection. It's all about the amount of games played and the probabilities of teams finishing with the same record.