So how does the matchmaking work?

So what is the idea behind it? I could understand if it were same rank players but it can be from bronz 5, bronz 3, some silver vs like 3 preemade friends/team and silver! I mean what is the algorytm or idea of matchmaking. I cant figure it out. It seems somehow super strange and sometimes plain and simple setting you up to fail! Maybe someone can explain in simple terms what is the idea behind it!
Report as:
Offensive Spam Harassment Incorrect Board