To some people (like me) gifts are one of the primary ways they express love to other people, so not keeping something they give you is like rejecting their love. If they ever found out that had happened, they would be extremely hurt. Exchanging a gift for something else if it didn't fit or duplicated something else is probably okay, but that would depend on the giver's personality and relationship with the receiver.
Even people who use gifts to express love sometimes give things to others as a matter of politeness or social necessity. A gift from a co-worker or casual acquaintance could certainly be passed on to someone else without causing a problem.
And if it's obvious that the giver wouldn't care if something is passed on to somebody else, then it's okay to do that.
But many gifts should be treasured even if they aren't what the receiver would have chosen because they show the importance of the relationship with the person who gave them.