As I was working through the early chapters of Matthew a few weeks ago, I came across this perspective from N.T. Frances,
The introduction to this discourse [Matthew 5-7] has in one sense already begun in 4:23-25 since the crowds, introduced in 4:25, are cited as the reason for Jesus; move up into the hills. But the audience of the discourse is specified not as the crowds but as “his disciples,” a term used here for the first time in Matthew, but presumably intended in context to denote those who have been called to follow him in 4:18-22, together with others who share the same calling and commitment. The crowds are thus deliberately distinguished from the audience of the discourse, even though in 7:28-29 we shall find that they have been listening to it, perhaps as an outer circle “eavesdropping” on what he has to say to his disciples. It is explicitly to the disciples (“them,” v. 2) that the discourse is addressed. While the crowds are themselves often the object of Jesus; concern both as a teacher and a healer (9:36; 13:2; 15:30; 19:2), there are also times in Matthew when he deliberately moves away from the crowds in order to be with his disciples (8:18; 13:37; 14:22). Sometimes he “withdraws” (4:12; 12:15; 14:13; 15:21 in contexts of hostility or danger, but this is simply the search for a quieter environment for teaching.
I have translated eis to oros as “into the hills” because here and in 14:23; 15:29 (and, I shall argue, also in 28:16) I take to oros to be a general term for the hill country to the west and north of the Lake of Galilee, where the hills rise steeply from the lake.