Just wondered why my black moccomaster filter coffee from bean tastes so good with sugary foods like donuts and ice cream.
I recently visited a coffee festival in Amsterdam and there were some discussion on this topic, or more generally about the effects of caffeine on our perception of taste. Apparently, research has shown that caffeine makes it harder for us to taste sweetness. After a bit of googling i founds the study I think they were referring to here. The abstract gives you pretty good idea about the study so I won't paraphrase here.
This perception of sweet food as less sweet apparently makes us crave and enjoy sweets more, which might explain what you have experienced.
Another explanation I've heard is that sweet food compensates for the bitterness of coffee but I couldn't find any scientific evidence for that :)