Imaam Abu Muhammad Al-Hasan b. `Alee b. Khalaf al-Barbahaaree (died 329H, rahimahullaah) stated in his Sharhus-Sunnah (point 36):
والصوم في السفر من شاء صام ومن شاء أفطر
“Fasting whilst upon a journey – whoever wishes fasts and whoever wishes breaks his fast.”
From the allowances that Allaah has bestowed upon His servants is to break the fast in the month of Ramadaan whilst upon a journey. So this is an allowance. Whoever wishes may break their fast, and whoever wishes may continue fasting. If one continues to fast, then his fast is sound and correct. This is due to the fact that a Companion asked the Prophet (salallaahu `alaihi wassallam) concerning his fast, that he had the strength and ability to fast whilst traveling. So the Prophet (salallaahu alaihi wassallam) permitted him to continue fasting.
Footnote: [Reported by Muslim, no. 1121, from Hamza Ibn `Amr al-Aslamee (radiyallaahu `anhu). He said: “O Allaah’s Messenger, I find within me the strength to fast. Is the any criticism upon me?” So the Messenger of Allaah (salallaahu `alaihi wassallam) responded: “This is an allowance from Allaah, so whoever takes it then it is good. And whoever continues to fast, then there is no harm upon him.”]
So this is an allowance [to give ease] and allowances are not obligatory to act upon. However it is better and more virtuous to act upon them just like the rest of the allowances. And if one returns to the origin of the affair and fasts, then there is no harm in that. And Allaah, the Mighty and Majestic, said:
فَمَن شَهِدَ مِنكُمُ الشَّهْرَ فَلْيَصُمْهُ ۖ وَمَن كَانَ مَرِيضًا أَوْ عَلَىٰ سَفَرٍ فَعِدَّةٌ مِّنْ أَيَّامٍ أُخَرَ ۗ يُرِيدُ اللَّهُ بِكُمُ الْيُسْرَ وَلَا يُرِيدُ بِكُمُ الْعُسْرَ
So whoever sights [the new moon of] the month, let him fast it; and whoever is ill or on a journey – then an equal number of other days. Allah intends for you ease and does not intend for you hardship..
And he himself (salallaahu `alaihi wassallam) would break his fast upon journeys.*
[*Reported by al-Bukhaaree, no. 1842. Muslim, no. 1113, from Ibn `Abbaas (radiyallaahu `anhumaa) that: “Allaah’s Messenger (salallaahu `alaihi wassallam) left for Makkah in the month of Ramadaan and he fasted until he reached al-Kadeed. Then he broke his fast, and the people also broke their fast.”]