How does the shape of an espresso cup affect the flavor? Similar to the question:
Why do drinks drunk from a glass instead of a bottle taste differently?
Where the top answer notes the logic behind each glass for a particular drink:

Wine glasses, for example, are optimal for giving the nose an opportunity to experience the wine. They enclose a volume that allows you to swish the wine in the glass (without spilling it) to impart the aroma to air in the glass. The usually tapered opening keeps the aroma from dissipating before your nose can sense the wine.
Champagne flutes, keep the effervescent champagne or prosecco bubbly and cold long enough to enjoy the drink without it going flat.
Different beer glasses are optimal for showcasing the &quot;head&quot; and are tall for the same reason as champagne flutes (to keep the effervescence going as long as possible).

How does the shape of the typical (see below) espresso cup affect its flavor?

CC image used with permission: Credit to Flickr user davharuk.
As I see it, the typical espresso cup shape and material (Thanks JAIL!) does three things for espresso:


the thick ceramic insulates the coffee, helping it retain heat as
well as protecting your fingers from being burnt;
the shape is compact rather than wide or tall, minimizing the ratio of surface area to volume, to further retain heat;
the tapered cup and round bottom allow you to easily mix sugar and/or chocolate into your espresso, getting an even distribution in the liquid.


The round bottom of the typical espresso cup also makes it easy to clean.  I have some very decorative square-bottomed espresso cups, and the inner corners are pretty much permanently stained.