I attended Fajr prayer with the Messenger of Allah ﷺ in Masjid al-Khayf. When he finished praying, he saw two men at the back of the people who had not prayed with him. He said: “Bring them here.” So they were brought to him, trembling. He said: “What kept you from praying with us?” They said: ‘O Messenger of Allah ﷺ we had already prayed in our homes.' He said: “Do not do that. If you have already prayed in your homes, then you come to a masjid in which there is a congregation, then pray with them, and it will be a voluntary prayer for you." (Using translation from Nasāʾī 858)
شَهِدْتُ مَعَ رَسُولِ اللَّهِ ﷺ حَجَّتَهُ فَصَلَّيْتُ مَعَهُ صَلَاةَ الصُّبْحِ فِي مَسْجِدِ الْخَيْفِ مِنْ مِنًى فَلَمَّا قَضَى صَلَاتَهُ إِذَا رَجُلَانِ فِي آخِرِ النَّاسِ لَمْ يُصَلِّيَا فَأُتِيَ بِهِمَا تَرْعَدُ فَرَائِصُهُمَا فَقَالَ «مَا مَنَعَكُمَا أَنْ تُصَلِّيَا مَعَنَا؟ » قَالَا يَا رَسُولَ اللَّهِ كُنَّا قَدْ صَلَّيْنَا فِي رِحَالِنَا قَالَ «فَلَا تَفْعَلَا إِذَا صَلَّيْتُمَا فِي رِحَالِكُمَا ثُمَّ أَتَيْتُمَا مَسْجِدَ جَمَاعَةٍ فَصَلِّيَا مَعَهُمْ فَإِنَّهَا لَكُمْ نَافِلَةٌ»