One of the best resources that deals with this subject is to be found on the site of Genelec, speaker manufacturer.
Specifically, page 9 of this document is worth a read.
The reason, as already explained, is resonance - standing waves that form when you are in proximity to a wall.
Note this also applies to all other walls in the room, not just the one the speakers are against.
If you are working in a space where you can't really do much to alter the space itself, then sometimes you can get a free ride by playing with the ...
"Most people have noticed that when a speaker of any size is placed against a wall, it’ll deliver stronger bass response. This can be a strong temptation to use this acoustic phenomenon (a function of standing waves) to provide some additional heft, especially from smaller (less than 8”) woofers. But this room-enhanced bass will have an uneven frequency ...
That's caused by reflections off the walls interfering with the direct sound from the speaker. At some frequencies, the reflection will cancel out the direct sound, at other frequencies they will add up, so the frequency response changes from the intended one.
The manual may contain some information on the intended placement of the speakers.
XLR and TRS are two different things.
XLR is a "balanced" audio cable, which means that it sends the signal in such a way that the noise picked up while traveling over the cable can be canceled out by comparing two different signals on the cable.
TRS, on the other hand, is used for a slightly wider array of things. It can be used for unbalanced stereo ...
Assuming that the same type of cable is used with either configuration, there will be no sound quality difference.
The plug type makes no difference to the fact that there are essentially three electrical connections that need to be made.