I've never for the life of me understood this. It's as though the IIHF waits for all the lesser leagues to finish but doesn't wait for the NHL. Shouldn't a world championship consist of the best players rather than the best players whose teams failed in the NHL? On top of that, wouldn't a lot more people in North America care if the tournament were not competing with the Stanley Cup playoffs? I mean, surely the IIHF cares about money and notoriety and would want the tournament held when it gets the highest viewership. Is there a legitimate reason for this, or is some Swiss bureaucrat involved in some power struggle ****fest with the NHL?
It's mainly for historical reasons. For many years, professionals were not allowed to participate in the World Championships. (However, due to a loophole in that rule, players from Eastern Bloc countries , even if the government was paying them, were allowed to participate, while NHL players were not.) So during those days, the NHL and IIHF decided to schedule their biggest tournaments during the same time of year, and there was no conflict because players eligible for one could never be eligible for the other.
The IIHF started allowing NHL players to participate at the WCs in 1977. However, by this time, both the Stanley Cup Playoffs and the WCs had been scheduled in April/May for a long time, and neither organization wanted to reschedule for a variety of reasons.
In the end, it comes down to money. The NHL makes loads of money precisely because its season is so long (more games, more tickets sold), so it's not to their benefit to cut short their season to allow its players to play in the WCs.
The IIHF also makes lots of money from the WCs. If they scheduled the WCs after the SC Playoffs (in late June), there would be much less interest simply due to the climate at that time of year. Also, many of the countries at the WCs (Latvia, Switzerland, etc.) have only a few (or no) NHL players, so their ticket sales aren't affected much by the playoffs happening at the same time.