Maharil Diskind (based on the Rambam in Shemoneh Perakim) explains it like this:
A prophet experiences prophecy through the channel of his personality. Therefore, no two prophets ever prophesize with the same style (Sanhedrin 89a). Every prophet puts the stamp of his/her own personality on their prophecy. However, Moshe Rabbeinu saw the prophecy directly, unadulterated. This is expressed in the gemara's analogy that all other prophets saw through a dim lens, while Moshe saw through a bright lens (Yevamos 49b)- their lenses were tinted with their own personalities, while Moshe saw the pure prophetic image/message.
There was one other exception. Sifri Devarim 357:10:
ולא קם נביא עוד בישראל כמשה בישראל לא קם אבל באומות העולם קם. ואיזה זה? זה בלעם בן בעור
-no prophet rose up among the Jews like Moshe (Devarim 34:10), but among the nations there did arise, and who was it? Bilaam . Bilaam was given the "gift" of pure prophecy as well. (This was because his personality was so filthy that it was impossible to give him prophecy through the conduit of his personality, and in order to give him the prophecy that blessed the Jewish people, it had to circumvent his personal imprint on it.)
Therefore, when Moshe wrote the entire Torah, the prophecies that Adam had experienced, the prophecies that Avraham had experienced, and everyone before him, it was the original presentation of that prophecy in it's purest form. It was his own book because he was the one writing it as a pure expression of the prophecy for the first time. However, the prophecy of Bilaam wasn't Moshe's original work - it had already been prophesized, in it's pure accurate form, by Bilaam.
Therefore, when he wrote down the prophecy of Bilaam, he was just copying it over, restating what had already been stated.