In Competitive mode, you are matched with the closest ranked opponents from among those who are searching for a match.
Unfortunately, the players closest to you in rank are not always available. It means that after some time of searching you will be paired with those who are currently available.
There will be a large difference in player ranks after installing the latest update.
You may also encounter a team with different ranks playing together through the public lobby.