In classical mechanics, the lagrangians of two particles may be added only if the particules do not interract.
I wouldn't say that. You can always write a Lagrangian $L$ for a system of two particles. In general, it takes the form
$$L = L_1 + L_2 + L_i$$
where $L_i$ is an interaction term that depends on the coordinates and/or velocities of both particles. If and only if the particles don't interact, $L_i = 0$, and only in that case can you write the Lagrangian as the sum of individual particle Lagrangians $L_1$ and $L_2$.
A similar idea applies in quantum field theory. Remember that QFT Lagrangian densities take forms like
$$\mathcal{L}(\phi, \partial\phi) \sim (\partial\phi)^2 - m^2\phi^2 - \sum_n g_n\phi^n$$
Of course there are many different kinds, but in general there is always a kinetic term which involves the derivatives of the fields, and other terms which represent either the mass of the field or interactions between the field and itself or other fields.
Now, in a sense, a derivative is a way of coupling the values of some object at different spacetime points. So it should make sense that the kinetic term of the actual Lagrangian
$$L_\text{kin} \sim \int\mathrm{d}^3\mathbf{x}\ (\partial\phi)^2$$
couples the values of the field $\phi$ at different points in spacetime. This is analogous to the term $L_i$ in the classical Lagrangian which involves the coordinates of multiple particles, except here, coordinates are replaced by fields and particles are replaced by locations. So you have a term that couples the fields at different spacetime points.
Notice, though, that in the rest of the Lagrangian, there are no derivatives. This means that outside of the kinetic term, there is no connection between what happens at different points in spacetime. Specifically, the interaction terms
$$\int\mathrm{d}^3\mathbf{x}\ \sum_n g_n\phi^n$$
are local, which means that all field interactions occur at a single spacetime point. This is a simple way to ensure that interactions don't proceed differently when viewed from different reference frames. So there's no problem with integrating the interaction terms over all of space.