Costa Rica is a biological bridge and filter between North America and South America's Flora & Fauna. For around 70 million years both continents had no contact, and there was actually no division between Atlantic and Pacific oceans. It was about 10 million years ago that the bottom of the ocean was lifted due to geotectonics forming the geographical bridge between both continents, in what is now days part of Nicaragua, Costa Rica and Panamá. Actually the S shape of Panama is strong evidence of this tectonic forces.
This is why biodiversity in Costa Rica is huge, and it is expressed in avian fauna with more than 875 species of birds (57 of them are hummingbirds)