As far as I know statements in formal logic are written in a (formal) alphabet which are just symbols, where the allowed sentences have to follow certain rules. If they do, they are called well formed. At first however, the elements of the alphabet are just symbols, without deeper meaning. Furthermore one has logical symbols such as the quantifiers $\forall, \exists$. Valid steps in a proof are those that are allowed according to certain rules, so called inference rules. As far as I understand, these rules are based on observations of how things work in the real world, leading to choosing exactly these rules as the logical ones. Thus, assuming that the observations are true, the inference rules should also be valid to get true statements from true statements (note that this is an assumption I make; I don't know for certain whether observations about the real world lead to the formulation of the inference rules as they are today).

Now suppose one wanted to logically prove some real world statement. Suppose one has introduced a Predicate symbol $\mathrm{Likes}(a,b)$ for all persons $a,b$. Suppose also that from the axioms and inference rules we can prove for the persons $x$ and $y$ $\mathrm{Friend}(x,y)$ is true. Now, a proof here is just a list of symbols, not (yet) related to the real world at all. We have some symbols and inference rules which allow us to conclude statements, just like playing a game and thats it. However, we can interpret our symbols, which should give more meaning. Note that I am not sure if this is the notion of "interpretation" that is used in logic, as I didn't read up to that yet. But intuitively (and according to this section on wikipedia) we can give the symbols the meaning: $x$ represents a person, $y$ represents a person, $\mathrm{Likes}(a,b)$ represents "$a$ likes $b$" and $\mathrm{Friend}(a,b)$ represents that $a$ and $b$ are friends. Assuming that our axioms are based on some true real world observations, we would expect that our formal proof (that only consists of symbols and are not connected to the real world) with this interpretation leads to other true statements about the real world. This means that if I know that $x$ actually likes $y$ and we can conclude from a formal proof that $x$ and $y$ are friends, why can we conclude that $x$ and $y$ have to be friends in the real world? That is, why are our symbolic, on paper proofs actually giving the desired outcome (about the real world)?

Thus far the question is about logic but little about maths. However, assuming a rather platonistic view of mathematical objects this becomes a mathematical question as well. For example if we prove properties about numbers and assume their existence, we expect those properties to also hold true when proven by a formal proof. For example, if one can prove $x+y=z$ for some numbers $x,y,z$ and assume a platonistic view, one would expect that "$x+y$" and "$z$" would actually name the same thing.

Note that this question is sort of related to What is a proof?, especially the answer of Ittay Weiss.

Note also that I am trying to read some basics about logic in my spare time, so I apologize if anything I say is wrong, since my knowledge is still rather superficial and I am not really educated in that area.