It means deciding to side with someone, especially in a conflict or competition. As the two divisions argued, she threw in her lot with the marketing team.
Pro Tip 2/3
Shared Outcome
It suggests sharing the risks and outcomes of the group you're joining. The villagers threw in their lot with the developers, hoping for a share in the profits.
Pro Tip 3/3
Personal Advantage
The phrase often implies a hope to gain personal benefit from the alliance. He threw in his lot with the new boss to secure a promotion.