There are several possible reasons for this, and a few cures:
Make sure you are using lines/arrows that are intended to be straight. There is a type of connector that has a “break” in the middle that automatically puts right angles in for you, so the line looks like a “Z” but with the slanted upright being vertical (I hope this makes sense!). If you then try to make this straight by manipulating the various handles, it is extremely easy to be left with a tiny kink.
Try variations of snap to grid and snap to shape. This is where it can get messy. If you have a shape that is snapped to grid, but you want a line/arrow to go to, and be snapped to, its middle connector, it is possible that the middle will not exactly line up with a grid position. The lines/arrows will then be left at a slight angle and looked kinked. You could switch to snap to grid (rather than snap to shape) and make sure the two ends of the line are on the same grid line. The downside is that you will no longer be exactly at the middle of the shape, and you won’t be connected to the shape either, so moving it will leave the lines behind.
Finally, if you open the size and position task pane and click on the line/arrow you will see things like Begin X, Begin Y etc. One of those is Angle. It is very likely it will be something like 1.003 deg. Change it to 0, 90, 180, -90, etc whichever is nearest i.e. to match horizontal, vertical and backwards version of these.