It depends. Foods made proprietary blends of ingredients can be quite different.
But staples, like sugar, flour, and simple mixes are often the same item packaged in the same place using different labels. I worked in a baking supply factory one summer to see this first hand.