To answer your question, it depends; but basically what Big Cat is saying is spot on.
Every team wants to win and the yellow jersey is naturally the biggest, but over the years the secondary jerseys have developed a lot of cachet plus a stage win makes sponsers, team and rider happy.
Take what Sunweb did today--they have formed and reformed around different sponsors and have tactically had a pretty good tour based not only on whatever plan they had at the beginning, but what has developed over the last few weeks of racing. They now have stage wins, a virtual lock on the polka dot jersey and are in hot pursuit of the green jersey.
Crashes, sickness, DQs; no one wants to see a team decimated, but things can change in the blink of a mistimed granola bar. Team Sky is so strong that losing Geraint Thomas was bad, but they have a strong team overall. Other teams may not be so fortunate. FDJ, another French team, is down to like four riders. It wasn't so long ago that AG2R (French) was not very strong until Roman Bardet developed but are getting better talent each year. The teams w/o depth have riders who are way better than most but still have difficulty keeping the brutal pace of the tour. It is just that freaking hard.
When you add in the riders jumping from team to team, things can change each year--especially if a more $$ team scoops up your better rider. How do you suppose Sunweb feels about Matthews gaining points on their former sprinter specialist Kittel? I didn't pay that close attention, but hopefully it was on good terms that the team & Kittel parted ways. Otherwise, this adds to the behind the scenes stuff and the high speed chess as they roll along some pretty scenic byways.
There is a lot more, but teams come and go, riders come and go, having a solid loyal deep pocketed sponsor helps tremendously and anytime you win anything, celebrate cause you could crash off the side of a mountain and disappear....