Prepositions are tricky. Each preposition typically has several meanings (sometimes more than a dozen), and the meaning often changes depending on the verb.
1) I gave a book to John.
2) I gave a book for John.
2a) I bought a book for John.
If the verb were bought instead of give, the second sentence would work. However, the expression gave something for someone sounds awkward. I wouldn't use #2 unless, say, John couldn't make it to a baby shower, and I gave the mother-to-be a book, saying the book was from John instead of from me. When dealing with gift-giving, we typically buy something for someone, and we give something to someone.
3) He brought a chair to her.
4) He brought a chair for her.
Both of these are fine, and mean pretty much the same thing. The first emphasizes the action; the other emphasizes the intent. The version with to could be further explained as: He brought a chair to where she was standing, while the version with for could be paraphrased as: He brought a chair for her to sit in. Put another way, the first tells us where he brought the chair, the second tells us why he brought the chair.
5) I sent a letter to Steve.
6) I sent a letter for Steve.
Sentence #5 is a normal, idiomatic way to explain that Steve's name and address were on the envelope, and we mailed the letter to him. Sentence #6 is more unusual, but it isn't incorrect. Let's say Steve and I are roommates, and he wrote a letter to his mom last night. He wants to send this letter today, but the post office is five miles in the wrong direction during his daily commute – yet he knows I drive right by the post office on my way to work. He asks, "Would you mail this for me this morning?" Naturally, I agree. When I get to work later that day, a co-worker might say, "As I was driving into work, I thought I saw you getting out of your car at the post office," and I might answer, "Yes, I was sending a letter for my roommate Steve," meaning I was doing him a favor.
This isn't the only interpretation for Sentence #6. We might say:
We sent a card for Steve.
meaning that we mailed a card for Steve to receive. (Perhaps Steve is in the hospital recovering from surgery, and we sent him a get-well-soon card.) Much like the chair example discussed earlier, using to emphasizes where the card was mailed (to Steve), while using for emphasizes why the card was sent (to cheer him up). The version with for may sound a little awkward by itself, but, with the right surrounding context, it could work. We need to be careful when we say something is "wrong." Wrong doesn't always mean grammatically wrong, sometimes it just means not idiomatic, or unusual, or it doesn't mean what you are trying to say.