Not a contract, in most cases, you're hired into the company rather than a specific team. To be clear it's not just two weeks to find a team, you spend the entire length of bootcamp (6-10 weeks) evaluating teams (you evaluating them, not the other way) to pick one. I preferred that much more to Google's approach, where passing the interview loop leads to the tedious team selection process - before an offer is extended.
And to answer a question from a neighboring comment, it's exceedingly rare for a match to not happen. There are way more teams with open headcount than candidates looking, so teams and managers go out of their way to woo the incoming folks. I don't know exactly what happens if one spends two months fruitlessly, presumably somebody from the bootcamp program would have a long conversation with them about their general fit at the company.