More complex, diverse and innovative is the new norm in software products. To handle that, teams need to be heterogeneous and capable of performing teamwork -- challenging those in higher education to understand factors that motivate or demotivate team-members. This article explores willingness and motivation of students to perform teamwork in a dynamic context scenario. After analyzing the team behavior in 60 real-world software projects, conducted in a software engineering course, we identified the factors that influence teamwork in such a dynamic context. These factors were used to create a model that can be reused by other instructors.