The preposition for is very common in English, and it has many different meanings: purpose, reason, exchange, etc. Please take a look at the dictionary entry for many examples of usage. Your sentences are all good examples.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.