The gemara begins its discussion about the parameters of bishul akum. However, more fundamentally is understanding the rationale for the gezeira on bishul and pas. Tosafos explains that from the fact that the gemara uses the term מנהני מילי to introduce the discussion about bread and even cites a pasuk, implies that it is d'oraysa, until it concludes that it is only d'rabonon. For the gemara to make such a mistake and think that it was d'oraysa implies that it is a very early gezeira, that predates the gezeira on bread made by shamai and hillel. This is how Tosafos explains why the gezeira on pas failed to be accepted, whereas the gezeira on bishul was and remains strong - they are two separate gezeiros on two separate entities, so the leniency on bread doesn't affect "shlakos" (cooked foods).
There is a very difficult contradiction in rashi that is even pointed out by Tosafos. Rashi in the mishna says that the gezeira on shl'akos is because of intermarriage, but on the gemara 38a rashi says that it is to prevent the jew from eating in the non-jews home since it will lead him to eventually eat not kosher. According to Rashi's explanation in the gemara that the gezeira on shlakos is more of a kashrus concern, it certainly would have nothing to do with the gezeira on bread. However, the contradiction in rashi is very difficult?
Tosafos is also hard to understand. Tosafos quotes Rabbeinu Avrohom who says that the issur of shlakos only applies to food cooked in the home of the goy, not to food cooked in the home of the Jew. Tosafos disagrees because - לא חלקו כלל חכמים בין רשות הישראל לרשות העובד כוכבים כי לעולם יש לחוש .שמא לא יזהר גם בביתו של ישראל כמו בביתו של עובד כוכבים Tosafos had already rejected rashi's approach that the issur is a concern of kashrus that the goy will feed the Jew something not kosher, yet Tosafos rejects Rabbeinu Avrohom by saying that even in the house of the Jew the concern of feeding the Jew something non-kosher applies?