Low quality fuel can cause this condition if contaminants are present, such as too much alcohol, which lowers combustion temperature. When the fuel doesn't burn hot enough, it leaves a sooty coating on the inside of the engine, which can accrue over time.
The engine in your vehicle is meant to reach a specific running temperature as you drive. You may notice, for example, that the engine works just a little harder in the cooler months of the year. This is partly because it needs to use more fuel to get up to that special temperature where everything just works better. Short trip driving in general can cause this as well, as the internal parts of the engine don't get hot enough to effectively burn off that extra fuel.
Fuel additives can also cause this to happen. Using third party fuel additives that get emptied into your fuel tank, or some already in the fuel mix, which are promised to clean your fuel system as you drive, are not specially designed with your vehicle's components in mind. They're more of a generic product that can have a range of effects.