Note: below I use the words "store" and "chain" interchangeably. I refer to the company itself and not the individual retail locations. That being said:
Ok say you wanted to manufacture your old family pasta sauce recipe. You have either leased plant space or another sauce company is making your product for you. Your items got FDA approval, BBB, UPC registrations etc. You have access to trucks to ship your freight to warehouses too. These are a bunch of hoops to jump, and you somehow successfully did it. That is out of the way for now...
Now you need to sell your products to make a profit. Some stores like Whole Foods you can simply walk into one of their buying offices, give them samples, explain your pricing, show off your production capabilities, and they will either say yes or say no but might give some suggestions (pricing, remove ingredients, etc) and you can meet again later. Whole Foods and local mom & pops are still able to be personally sold to. My friend started a spice company and simply walked into a Whole Foods office and got on the shelf. I told him he was crazy, but he proved me wrong. Whole Foods is just a different company with different consumers, so they succeed at it.
Then, say, you want to get on the shelf at your typical grocery chain, lets say Kroger. You can't simply walk into their offices, so you either need to know someone who has a connection or you hire a broker (2-5% rate of your case sales) to get you in the front door. I work for a broker, for example, and they are a reasonable tool to help you navigate through the bullshit. Once you are in, you do basically the same pitch to Kroger as you did to Whole Foods. Kroger then will ask what your slotting allowance is. "Slotting" is the equivalent of paying Kroger to get your item on the shelf. In my region (and depending on the product), it is typically a $30,000 non-refundable fee which gets your single item in most of their stores. The $30k only gets one item facing the consumer (called a "facing" [example] of the yellow box showing 2 facings, red box showing one facing). If you want more than one facing of an item [like these items], you typically pay the $30k times how many facings you want or they will allow. You typically don't have just one item but a line of products, so they ask about what kind of cash you have to place your other products on the shelf (same slotting rates). Then, they ask you for your promotional plans (how you market your items on your own: your website, Facebook site, TV commercials, print ads, blogs, etc. They look at this as free marketing for them). They will ask for a fee to place your items on new item racks, end-aisle displays, etc which can be tens of thousands. They will ask or require you to place your items in their FSI home mailers [example] which costs thousands more. Since it is a brand new brand, expect them to ask for demos in-store, which you supply your own labor and product and pay them for that opportunity. Then you have register scan discounts, VIP deals for special events like holidays (% off per case you sell to them for X weeks), gas reward programs, in-store circulars, [catalina coupons], etc. All of the last sentence you typically pay them for the ad insertion (to get the ad program up and running) and then redemption (every penny a customer earns in gas rewards, YOU pay the bill.). You can set dollar limits to these programs, but the chains often ignore them by mistake or intentionally (we have one client now that contracted their gas reward limit to $8000. Their redemption bill came out to over $45,000). Some typically expect you to buy their consumer loyalty card data (~$100,000/yr) as well as register data collected by Nielsen (~$100,000/yr) and shelf-allocation software [example] (~$40,000 per salesperson) to track your sales and help them with their assortment in the future after the products ship. They typically hit you up to be a sponsor in their golf outings and whatever other charities they participate in ($thousands, the stores don't pay much of their own money). You can obviously say no to any of this, but they are the ones who have the power to sell your items. If Kroger says no, you can lose out on tens of millions in sales, so most people go along with this stuff. If you have a unique product and a huge consumer following (like Chobani), you can say no much more easily because they more-or-less need your products on their shelf. I'm sure Chobani still pays slotting, but less and probably none for the other ad placements. All of the above is to just get them to say yes to sell your stuff. I've been in new item meetings where we hand the buyer a big powerpoint presentation with everything of the above they asked for, and the buyer will simply flip past the first 40 slides to the back to see how much money you have to spend. It is demoralizing and frustrating. We've even represented the #1 brand in a category in a store's region, and they will not take our product line because we won't pay them the money they ask. Keep in mind they are looking to make money buying your stuff before they look to make money selling your stuff.
Then its on the shelf and selling. If your items don't sell too well within ~12-24 weeks, your items can get discontinued, and you lose all that money and start over. If they don't discontinue it, they will ask for more money for different marketing programs you said no to above. A lot of the promotions go wrong or they take your money and never run the promotion, so your sales team is usually busy tracking down promotions and figuring out how to get your money back if your ad in the circular didn't run that week. Sometimes another new brand will pitch their items to the store, and they might suggest deleting your items to fit this new brand on the shelf, so you have to be constantly defending your shelf space. We've had stores that come to us and say "Hey, if you pay us $xxx, we will discontinue your competitor's brand, and you will be the only brand on the shelf". We paid a store $500,000 to do this last year because they told us it was either "us or them", so we paid it. This year, the competitor is back repitching their items and offering to match what we paid, so the store is on us about paying the $500k again this year. These are pretty crazy examples, but they happen often. Some categories (like peanut butter, for example) have 1-2 mainstay brands (JIF, Skippy), the stores own brand which is priced less, and then premium or ultra-premium nut spreads. In that category, it is less cut-throat, but I'm sure Peter Pan is trying to knock out JIF every day or almond spreads are trying to sneak onto the top shelf so it is very volatile anyway albeit less. I didn't even get into warehousing fees which I don't know too much about as I don't deal with that end. You might read all of the above and wonder how you can afford all that money, and the typical answer is company size: P&G, General Mills, Pepsi, Nestle, and all the others can afford this because they sell billions and billions a year. $500k is petty cash to them, to a family recipe pasta sauce company, that can be your annual profit. Edit: I forgot to mention a lot of big chains will ask for "retail support". This means larger companies and brokers provide a team of labor to work in retail locations for the chain for free. If you ever go to a retail store at 8am on a weekday and see people rearranging product on shelves wearing street clothes, those are our retail teams (good jobs/experience for college kids, unemployed/underemployed, and retired people. Check Craigslist and temp agencies. I paid my rent though school working retail.)
Some stores are easier to work with, some stores are harder. The above are worse examples, but every geographic region has one or more chains that are as demanding as the above. Some chains are actually very easy to work with you can consider their staff friends with your staff (people in this industry switch companies often, so most are friends). Some chains ignore a lot of the ad fee nonsense and focus on other strategies, like Wal-Mart. Wal-Mart is strictly the low-price leader strategy, so they forgo most or all of the fees and simply want your rock-bottom pricing. They also want to make sure you have the production/shipping capacity to fulfill orders too. Price and capacity is mostly it for Wal-Mart's demands. If you wanted to get your items into Wal-Mart, you simply go to Bentonville Arkansas, wait in line with everyone else, but I am seeing now that you can apply online currently as well. If you offer a lower wholesale price to a competitor, Wal-Mart will most-likely catch you and never sell your stuff again, period. It is easy to catch the cheaters because consumers report them (A lot of stores have price matching, so if a few dozen Wal-Mart customers start price matching your items from Kroger pricing, Wal-Mart has caught you). Because of Wal-Mart's sheer customer scale, they can demand this type of stuff from manufacturers. But again, Wal-Mart doesn't push you around with different fees, they just keep you at a razor-thin margin. My company doesn't deal with Wal-Mart at all; most manufacturers sell direct to them and don't use a broker.
TL;DR Anytime you see a grocery store make any mention of a brand or you see a brand on the shelf, the brand is forced to pay for that mention, almost no matter what. That Tide dongle you see on Amazon's site I guarantee Tide paid for that placement.
Edit: I hit the character limit. Didn't know there was one.