Everything that is mentioned above comes under the Incentive Theory of Motivation. This is where employees get motivated by external rewards like bonuses and such as mentioned above.
Team building could affect the motivation of the employees. As team building requires collaboration, employees would have to cooperate with one another during meetings or discussions. Members who are normally left out, would get a chance to speak out and give out their own thoughts. It helps get them out of their comfort zone and build their self-esteem. With this, they would be more motivated to come to work daily, as they would feel that they do play a role in the company.