Why not "Gracias para...."?
A question about "para" and "por". In these two sentences:
1) Me hice un cafe PARA empezar el día (I made a coffee to start the day)
2) Gracias POR invitarme (Thanks for inviting me)
In both sentences, a REASON is given: Starting the day is the reason for making a coffee (sentence 1) and your invitation is the reason of me thanking you (sentence 2). So, why is PARA used in sentence 1 and POR used in sentence 2?
Muchas gracias!
4 Answers
To simplify things: Me hice un café para empezar el día.
I made me a (cup of) coffee in order to start the day. In this construction "para" means "in order (to)"
"Gracias por invitarme" Here "por" means "in exchange for" You invited me and in return I gave you my thanks.
Por is used more than para.
Para can often translate as 'in order to'
It is useful to learn set phrases. Many are idiomatic. Gracías por is expressing gratitude
Gracías por la vida is a famous song. Mercedes Sosa sings it well. That will fix 'gracias por'
in your head.
Here is a good infographic

There is a mistake - the T under por should be por el parque below and they have missed out Gracías por.
You could concentrate as these pictures suggest on para which is used less often then everything else is por.
Here is an earlier recent answer in Spanish dict earlier answer
Here is my favourite blog with a good list of expressions
and here is an American site with a good explanation and self tests
Finally the cervantes site has a long list of phrases. If you get used to them your brain will slot in the correct phrase.
Thank you everybody. I know "gracias por" as a set phrase, but I'm using that as an example to contrast with my "para" example. I think my confusion stems from identifying the difference between "purpose" and "reason", which seem to be interchangeable.
It's not exactly the same:
Por [http://dle.rae.es/?id=TgJ7yhD] -- 7. prep. Denota causa (Denotes cause)
Para [http://dle.rae.es/?id=Rp1CuT2] -- 1. prep. Denota el fin o término a que se encamina una acción. (Denotes the end or term which an action is going)