Well, it depends where your ideas come from. Either can come first.
Lets take Trading Places (1983) and lets say the theme is around the nature nurture concept and the plot is the machinations which reverse Louis and Valentine's positions. It's perfectly feasible to believe the writers came up with a role reversal scenario involving certain actors (who may or may not have ended up playing the eventual roles) and then enhanced the machinations with the nature nurture theme.
On the other hand, lets take When Harry Met Sally (1989). It's perfectly feasible that Nora Ephron came up with the theme first (around the idea that, "can men and women be friends?") and then decided to show that being answered by having two people meet and then eventually fall in love.
The Hero's Journey and Transformation through a New World/State is the template upon which the vast majority of successful stories and Hollywood blockbusters are based upon. Learn about this at http://www.clickok.co.uk/index4.html