做媒 was historically a paid profession (
媒婆 'matchmaker woman' was a stock figure in Chinese folk drama) and is still alive in rural and traditional families, often handled by an aunt or older neighbor. The grammar is
给 someone
做媒 — 'to do matchmaking for' someone.