Somebody's got to win the lottery, right? And if the paycheck's high enough, you might decide to quit your job when you hit the jackpot (after scrupulous verification, of course).

There are dozens of other good reasons to leave a job, too. Learning you have a better job may be the top example, followed by such happy events as becoming independently wealthy, your mate getting a great offer in another city or doing some serious number-crunching and realizing you can give up your second job.

But there are a few times when quitting your job is a bad choice.

"Quitting a job due to emotion or because of one incident is generally a terrible idea," according to The Motley Fool personal finance advice resource. "Instead, no matter how strong the temptation, you must have the self-preservation instinct required to know that feeling good in the moment is not worth the resulting headache."

Even if you're revved to make a dramatic exit or "all your friends" are encouraging you to quit already, here are four times it's a terrible idea to quit, according to workplace experts:

You have a bad boss.

A waitress in Tuscon (not pictured) sent her former boss $1,000 and an apology after skimming a couple hundred dollars from the business.

Credit: Justin Sullivan

icon to expand image

Credit: Justin Sullivan

You may be telling yourself that life is too short to work for an ogre, but the better approach is to contemplate how long that boss might be in the position, along with what you might be giving up if he rushes you into quitting a solid job. "If you're in a role with lots of growth potential, there's a chance that come this time next year, you'll no longer be reporting to that same boss anyway, thus eliminating your key sticking point with the job," Maurie Backman wrote in Motley Fool. "On the other hand, if you let your frustration get the better of you, you might leave before getting a chance to grow your career."

If answering to a monster is the lone reason you want to quit, make every attempt to work on that relationship before you quit prematurely, Backman advised. "For starters, sit down with your boss and address the problem head-on," he said. "Explain that you're looking to improve your relationship and that you're willing to take steps to make things better for both of you. With any luck, that'll soothe the situation and get him to ease up."

Even if that doesn't work, consider getting HR involved or asking to switch to a different team. "But no matter what you do, don't pull the plug on a fantastic job before exploring alternatives," Backman warned.

You've got another offer, but you don't know if it will be better.

"Leaving a job to minimize pain should not be the primary reason for accepting another job," according to LinkedIn Influencer and CEO Lou Adler. "If the 'daily grind' is getting you down, you should consider some short fixes, but changing jobs should be just one of your options."

It's impossible to fully know if a new job that involves a lateral move or the same salary will improve your work outlook at all, according to Adler. "The big problem for most job-seekers is that when given an offer there is usually not enough information available to make a full long-term career assessment," he said. "In this case, it's up to the discerning candidate to better understand that what on the surface might appear to be a fine career move, underneath might be next year's excuse for why you want to change jobs again." To increase your discernment, Adler recommended such tactics as asking why your potential new job is open and how each of the skills requested during the application process will actually be used once you're in the new position.

You didn't get that promotion.

Oh, they don't appreciate you and they are going to pay... Indulge this fantasy for a few minutes and then move on is essentially the advice from finance writer Daniel B. Kline, author of "Worst Ideas Ever," in The Motley Fool. "Before you storm off in a rage or quit, it's best to do an honest assessment," he noted. "Request a meeting with the person who made the decision and ask what you could do differently next time. When that meeting happens, you may hear some constructive criticism and realize that you're not getting the position was actually fair."

If you're told things you don't want to hear during the sit-down, "those are important, too," Kline advised. "In many cases, who gets a promotion has a logic behind it. Sometimes that logic is simply seniority and that may be a tough answer to swallow. In other cases, you will learn what you need to do in order to not be on the outside looking in next time."

Should further examination reveal that your boss does not, in fact, have other plans for you or you're not the next in line, that information is a good starting point for making rational plans for the future.

You feel like you're not doing great work. If this describes you and your job, don't leave yet, Forbes contributors David Sturt and Todd Nordstrom urged.

"At your current job, do you make a difference for your team, your leaders, and your customers?" the duo asked. "Are you making positive changes and chasing new innovations? If you're shaking your head no, well, this is your issue to solve and not your organization's."

In other words, quit your job and this feeling may follow you to the next and the one after that. "Of course it can be demoralizing and frustrating to feel like you don't make a difference at work," Sturt and Nordstrom added. "But not producing your best work is not a reason to leave — rather, it's a chance to embrace a new mindset."

Citing global research culling from more than one million cases of award-winning work, the duo advised those who felt less than great about their work to take it upon themselves to set a goal of making a difference at work that people will love. "Your bosses will likely notice your newfound passion and pursuit," they concluded. "They hopefully will recognize your efforts and support you in your quest of achieving greatness."