One thing to notice
The crowd in Revelation 7 is explicitly innumerable, drawn from every nation and tongue — and then Matthew opens with blessings aimed precisely at those the world counts as nothing: the grieving, the broke, the pushed-aside. The lectionary sets these two passages against each other so that the vast, robed company in heaven and the people Jesus is looking at on the hillside turn out to be the same people.