At the time that the Baalei haTosafot were writing, Rashi’s commentary on the gemara was a stand-alone text. It seems likely that some people learning gemara may not have had access to it. As such, whenever the tosafists want to refer to something that Rashi said, they quote the relevant part of his commentary, and they attribute it to him either by name (eg: Berakhot 53b, s.v. באכילה), or as the “booklet” (kuntres; eg: Bava Batra 2a, s.v. השור). But sometimes it also happens that they say exactly the same thing that Rashi says, without attribution and without adding anything new. An example of this would be Berakhot 6a, s.v. כי כסלא לאוגיא.
Why do they do this? Did the tosafists only name their sources when they were disagreeing with them or adding something new? Alternatively, is it possible that in the version of Rashi’s commentary that they had access to, that particular section wasn’t there? I’m trying to understand why a group of people who are usually so careful to quote Rashi might sometimes say exactly the same thing that he said, but without giving any indication as to the fact that he had said it.
Alternatively, is it possible that in the version of Rashi’s commentary that they had access to, that particular section wasn’t there
Yes. Manuscripts of Rashi vary significantly. Rashi himself probably wrote multiple editions, which ended up being merged, and we have relatively few manuscripts from his own time to confirm the originals. All this IIRC.