I always believed that mayonnaise should be kept in the refrigerator at all times, and then I went to cooking school. One of my first classes was cold foods, where we learned about cold sauce preparation, and where I learned about real mayonnaise and fake, evil mayonnaise.
Real mayonnaise is a fresh preparation, meaning you make it pretty much right before you want to serve it. It is an emulsion made using egg yolks, oil, lemon juice, mustard, salt and pepper. Given the main ingredient is raw egg, real mayo is at high-risk for bacteria like salmonella. Once made, real mayo should be used immediately, and anything that cannot be used should be stored in a clean, sealed container in the fridge for no more than one week.
Fake, evil mayonnaise, on the other hand, is not a fresh preparation. In fact, it's probably months old before you even bring it home from the store (there should be a red light going off in your head right now). You can't store raw eggs at room temperature in sealed jars for months without adding tons and tons of preservatives. And that's exactly what is in the fake evil mayo, so much, in fact, nothing grows in that stuff. You can store an open jar of commercial mayo on your counter-top for over six weeks and it will still be considered "safe". it was an in-class experiment. In my opinion, the fact that we left it out and open for six weeks is less disgusting than the amount of chemicals that must be in it to make such a feat possible. Regardless, most people cross-contaminate it when they dip in a knife or spoon while making a sandwich or salad. It's those little food particles that'll go bad if you leave your evil mayo out, not the mayo itself. So maybe it's a good idea to throw that tiny jar of chemical-egg goo in the fridge too.
To make your own real mayonnaise:
Use a whisk or an electric mixer to combine one egg yolk with one teaspoon of dijon mustard, one tablespoon of fresh lemon juice and a pinch each of cayenne pepper and salt. Beat until frothy, approximately two minutes. Next, while whisking or mixing, slowly drizzle in 3/4 of a cup of good quality oil, keeping in mind that your mayo will taste like whichever oil you choose. If you notice a sheen of oil on the top, you are adding the oil too fast, and your emulsion may break. Slow down speed racer! Once all of the oil is added, continue to mix for another minute or so. Then taste it, and re-adjust salt, and lemon juice to your preference. Use your lovely real mayo right away, or store it in a clean sealed container in the fridge for no more than a week. And keep the nasty, dirty knives and spoons out of this- use clean ones please.