The reason why that was said, and mentioning the differences reported from Muhammad bin 'Abdur-Rahman In The Hadith Of Jabir Bin 'Abdullah About That
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا بَكْرٌ، عَنْ عُمَارَةَ بْنِ غَزِيَّةَ، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم رَأَى نَاسًا مُجْتَمِعِينَ عَلَى رَجُلٍ فَسَأَلَ فَقَالُوا رَجُلٌ أَجْهَدَهُ الصَّوْمُ . قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لَيْسَ مِنَ الْبِرِّ الصِّيَامُ فِي السَّفَرِ " .
It was narrated from Jabir bin 'Abdullah that: the Messenger of Allah (ﷺ) saw some people gathered around a man, so he asked (what was happening) and they said: "It is a man who is exhausted because of fasting." The Messenger of Allah (ﷺ) said: "It is not righteousness to fast when traveling."