Most people think of coffee as being naturally bitter, but the truth is, the coffee bean is made up of about 5 to 9% sucrose. Carrots, by contrast, have a sugar content of around 5%, which includes sucrose, glucose, and fructose. As far as infusing your sauce with sweetness, adding instant coffee works similarly to adding carrots. Unlike carrots, however, coffee also acts as a flavor enhancer.
The taste of coffee alone is uniquely earthy, but when you combine it with the seasonings that are usually included in tomato sauce, it results in a more savory, complex flavor. For the same reason, chocolate is often added to chili con carne and various barbecue rubs contain coffee grounds. It isn’t so much for the taste of the coffee itself, but rather the way it brings out the flavors in the other ingredients.