The matchmaking system attempts to put people in games with other players of similar rank, but it's not always possible to do so. Perhaps yours was the only game available when that person joined the queue. (Historical note: Until a recent patch, there were only two pools of games: One for players rank 7 and below, and another for everyone else.)
The other possibility is that the person was playing with a friend. You can always join a friend's game, regardless of what level either of you are. However, since rank is a measure of time played (XP earned) and not a direct measure of skill, this isn't as big a deal as it seems.