It's easy to see why the Costaceae wound up classified as they did. Take a look at the flowers below, which all belong to different species of Costaceae. If you had to sort them into three different groups, how would you do it?
Most people would probably put the two white-flowered species together, the two spiky, red-flowered species together, and the two pink-flowered species together. However, a quick glance at the positions of these species on the phylogeny below reveals that flower form is not a very good indicator of evolutionary history some species with similar flowers are not very closely related at all. To understand why this is the case, you need to know a little bit about the function of flowers, as well as the birds and the bees.