Actually the "son of man" in Daniel 7 is not written the same as "son of man" in Ezekiel. For example the first use in Ezekiel is at 2:1:
And he said to me, “Son of man, stand on your feet, and I will speak with you.” (Ezekiel 2:1) [ESV]
וַיֹּאמֶר אֵלָי בֶּן־אָדָם עֲמֹד עַל־רַגְלֶיךָ וַאֲדַבֵּר אֹתָֽךְ׃
“I saw in the night visions, and behold, with the clouds of heaven there came one like a son of man, and he came to the Ancient of Days and was presented before him. (Daniel 7:13)
חָזֵה הֲוֵית בְּחֶזְוֵי לֵֽילְיָא וַאֲרוּ עִם־עֲנָנֵי שְׁמַיָּא כְּבַר אֱנָשׁ אָתֵה הֲוָה וְעַד־עַתִּיק יֹֽומַיָּא מְטָה וּקְדָמֹוהִי הַקְרְבֽוּהִי׃
The phrase in Daniel is the Aramaic כְּבַר אֱנָשׁ. The phrase(s) in Ezekiel are the Hebrew בֶּן־אָדָם. In English they get translated as the same but in the original texts, they are different. The literal Hebrew of Ezekiel could be translated as "son of adam" which would be distinct from "son of man (אִישׁ)".
While the meanings appear to be the same, the prophetic picture in Daniel, given in Aramaic, is distinct from the person of Ezekiel. This is apparent from the contexts. In Ezekiel the phrase is used to refer to the person of Ezekiel; in Daniel 7 it most likely refers to a heavenly figure. As Lawrence M. Wills comments:
13-14: Human being, lit. "son of man: which in the Bible is idiomatic for human being (Dan. 8.17, Ezek. 2.1, Job 25.6). Here however, the celestial being is like a human being, i.e. has a human countenance. For the author it most likely represents a heavenly figure who will exercise judgment, perhaps Michael (see 10.13 n.). Christian tradition, especially in the Gospels, saw this as a prediction of Jesus as a heavenly "son of man." A messianic use of this title is also found in postbiblical Jewish literature (1 Enoch 46.1; 48.10; 4 Ezra[2 Edras] ch 13; b. Sanh. 98a). Some Rabbis rejected the future messianic interpretation by arguing either that the predictions had all been fulfilled in the past (b. Sanh. 97b), or that Daniel's predictions did not include the end of time (Gen. Rab. 98.2). Later in Jewish tradition the messianic interpretation faded and the one like a human being was seen as representing Israel (Ibn Ezra, Rashi).1
The Hebrew phrase in Ezekiel is also used in Daniel:
So he came near where I stood. And when he came, I was frightened and fell on my face. But he said to me, “Understand, O son of man, that the vision is for the time of the end.” (Daniel 8:17)
וַיָּבֹא אֵצֶל עָמְדִי וּבְבֹאֹו נִבְעַתִּי וָאֶפְּלָה עַל־פָּנָי וַיֹּאמֶר אֵלַי הָבֵן בֶּן־אָדָם כִּי לְעֶת־קֵץ הֶחָזֹֽון׃
Here the context is the same as in Ezekiel: it is used to address the person of Daniel. Thus the same phrase ("son of adam") was used to address these two Exilic contemporary prophets. Perhaps an additional connection is implied: Daniel like Ezekiel was of the priestly lineage. Josephus (cf. Ant., x. 10.1) said Daniel was of royal or noble descent which could be priestly or Davidic. Regardless, there is no reason to connect the "son of man/adam" in Ezekiel to the "son of man" in Daniel 7.
One possibility as to why these two prophets are addressed as "son of man/adam" is to symbolize the condition of the nation of Israel. They have been disposed of their land and exiled to Babylon, the general location of the Garden of Eden. In 70-years, they will "start over" by being allowed to journey from Babylon to Israel. Thus the two prophets are addressed as sons of adam, the first man.
- Lawrence M. Wills, The Jewish Study Bible, Oxford University Press, 2004, pp. 1656-1657