To begin, preheat your oven to 350 degrees Fahrenheit. To prepare your cake pans, start by spraying them with a non-stick baking spray. Then, line each pan with a piece of parchment paper and give the top of the parchment paper a final spray of baking spray.
In a large mixing bowl, combine the flour, sugar, cinnamon, baking soda, and salt. Whisk the dry ingredients together until they are well combined.
Next, add in the wet ingredients to the bowl. Whisk in the eggs, oil, vanilla, pineapple with juice, mashed bananas, and pecans (if desired) until everything is fully combined. The resulting batter will be thick and well-mixed.
Divide the batter evenly between the two prepared cake pans. Bake the cakes in the preheated oven for 24-30 minutes, or until a toothpick inserted into the center of each cake comes out clean.
After the cakes have baked, allow them to cool for 10-15 minutes in their pans. Once slightly cooled, carefully remove the cakes from the pans and allow them to cool completely at room temperature before frosting as desired.