The Mishna (עבודה זרה לה) writes that it is forbidden for a Jew to eat Pat akum, bread baked by a non-Jew baker. Rather one must only buy Pat Yisrael, bread baked by a Jewish baker. The main reason written in the Gemara is that bread is a very important part of daily life, and if one consistently partakes of the bread of a non-Jew and mingles with non-Jewish people it may start a relationship which can easily lead to intermarriage. Pat akum is one of many things that chazal made prohibited in order to keep Jews and non-Jews from mingling too much.
The Rama writes (יו”ד סי’ קיב סעיף א) even though the reason for the prohibition of pat akum is to avoid intermarriage, it is still forbidden to eat bread baked by a non-Jew when there is no possibility of intermarriage, such as a non-Jew who does not have daughters. The Shach (שם ס”ק ד) explains that even if this person doesn’t have a daughter to marry off, he has friends who do, and once you start befriending one you will quickly get to know others.
It is important to note that there are two types of pat akum. Pat Palter is bread of a commercial baker. This is bread which was baked to sell and not to be eaten privately. Pat Baal Habayit is bread that a non-Jew baked with the intention of keeping it for himself, not to sell. We will discuss the specific halachot of each category later.