The Apostle John did not come up with a new definition for "son of God" or for that matter "son of Man." The Jews have what is called "idioms." One of those idioms is called the "son of" idiom and can be found in both the Old Testament and New Testament.
For example in the OT you have "Sons of prophets." 1 Kings 20:35; 2 Kings 2:3, refer to men belonging to a prophetic band. "Prophethood" (that which distinguishes "prophets" from "non-prophets") is the very nature that unites the "sons of the prophets" with their metaphorical fathers ("the prophets").
The same holds true for the following examples. "Sons of the goldsmiths at Nehemiah 3:31. Sons of the troop (2 Chronicles 25:13) are men of the army. Sons of affliction (Proverbs 31:5) are afflicted ones. I think you get the idea.
In the NT, "Son of peace (Luke 10:6) refers to a peaceful person. Who was the "Son of perdition?" (John 17:12; 2 Thessalonians 2:3) is the lost one. This is applied to Judas. One more, "Sons of thunder" was the appellative applied by Jesus to James and John at Mark 3:17 because it signified something outstanding about their character.
What about Jesus Christ who identified Himself on numerous occasions as "the Son of Man" and as "the Son of God." The idiom DOES intend the meaning of a shared nature between ANY father, and his son and thus between "THE Father and THE Son.
The "Son of God" title is entirely consistent with trinitarian doctrine which states explicitly that the Son is of the same NATURE of the Father. Christ really IS the "son" of God and therefore, BY DEFINITION shares the distinctive nature of his father just as ALL sons bear the distinctive nature of their fathers.
That Jesus is ALSO the "son of Man" (obviously in the metaphorical sense, given the fact that his actual father was NOT any man) is also consistent with the doctrine of the trinity which claims that Christ was indeed truly a man.
You said, "Is there any reason why John ends his gospel by stating that Jesus is the Messiah, instead of stating that Jesus is God?" If you read the CONTEXT of the following verses you will notice a "trend." John 5:18, John 8:58, John 10:30, John 19:7 and the trial record at Matthew 26:57-65. At Matthew 26:63 the high priest Caiaphas specifically ask Jesus to swear as to His identity.
"You tell us whether (1) are you the Christ/Messiah and (2) the Son of God." At Luke 22:70, Jesus says, "Yes, I am." At vs65 of Matthew the high priest tears his robes and says, "Behold, you have now heard the blasphemy." It is not blasphemy to claim to be the Messiah but it is blasphemy (to the Jews) to claim to be the Son of God in the way Jesus is the Son of God by nature. The Jews understood this fact, but they did not believe Jesus.
This now brings us to John's authorial intent when we get to John 20:30-31, "Many other signs therefore Jesus also performed in the presence of the disciples, which are not written in this book; vs31, but these have been written that you may believe that Jesus is (1) the Christ/Messiah, (2) the Son of God; and that believing you may have life in His name."
In closing, I would like to make two points. Did you happen to notice the declaration of Thomas at John 20:28? Thomas answered and said to Him, "The Lord of me and the God of me." Secondly, my "scholarly" source is the Bible.