Are real-life products always connected to the show they have on their packaging?
This is simply merchandising, and it has nothing to do with the show itself. It's like being able to buy Tshirts, mugs, hand towels, baseball caps, etc with the name/logo/picture of a character/etc from a certain show. It's to make money from something other than DVD/BD sales or in the case of films, box office take.

In certain cases, there's a marketing collaboration. This is almost always a mutual thing, product gets a bit of marketing by placing the anime into its products (hand cream, champagne, eye drops, shaving razors, etc) and the anime gets a bit of marketing from the people who normally buy this stuff anyways. Depending on the specifics of the contract, there could payment for either the property or advertisement or in some cases, royalties.