Visio creates each new shape in a new layer, in front of preexisting shapes. This should be considered natural behavior, except in the instance of lines. Visually, lines are perceived to exist in parallel with the shapes the connect, so special attention may be required to keep line ends clean. The left side of the example below demonstrates how this behavior is observed under magnification: the rounded line end pokes out in front of the symbol.
There are two ways to fix this. The first option is to remove rounded line ends; to do this, select a line and navigate to Format -> Line. Set the Cap type to Square. This works fine for lines which connect to shapes on a flat side, but doesn't work out well at an odd angle.
My preferred solution is to move all shapes to a layer in front of the lines connecting to them. Select a shape, right-click and select Shape -> Bring to Front to move it to the foremost layer. Note that this method is also handy for hiding pseudo-connections, where a line isn't actually anchored to a shape.
The second image in the example below portrays the flush connection formed after the second solution is applied.