Almost every room in a modern home has a lever on the wall, usually unmarked. I am referring of course to a lightswitch.
A dungeon builder would usually have a utilitarian purpose for installing a lever. Depending how much the DM likes to model a realistic world, a lever would most likely do something boring and irrelevant. But then, a typical RPG dungeon doesn't usually model any kind of a realistic world.
In your average D&D dungeon, If there is a lever, there is likely to be only one of them. It will be big, draw attention to itself, have little if any overt indications of what it is meant to do, but what it does do will be dramatic, and it will likely be the basis for a whole encounter, if not that entire gaming session.
So its a win-win situation. The lever will either do something mundane and non-dangerous, or it will do something wild and adventure-worthy. In either situation there is no downside.
Just having a lever around at all gives the players a choice, and that creates drama, so a lever is inherently fun. And if it does nothing at all, well... that will just drive the PC's crazy with paranoia, and keep them wondering for the whole adventure, and that could be pretty darn fun too!
