The name of "cupcake" is given as it is a small cake the size of a teacup. In previous centuries, before muffin tins were widely available, the cakes were often baked in individual pottery cups, ramekins, or molds.
Cupcakes are often served during a celebration, such as children's birthday parties. Additionally, they can be served as an accompaniment to afternoon tea. They are a more convenient alternative to a large cake as they don't require utensils or division into individual portions.