There are several "target points". The game does not aim for the center of mass, it aims for the closest exposed target point to the center or something. Sometimes, that target point actually is obstructed when firing, leading to the bug that lets you fire diagonally into an UFO but always hit the UFO wall, or take shots and always hit the top of a hill instead of the target in the valley. Most of the time, the aiming point is far enough for cover that a hit is a hit (unless you are firing at a target that is very far away, in which case the small deviation on a hit might take you off target). Very, very rarely, you are in such a position that the target point is close ish to cover and things behave realistically.
We had a whole discussion with volutar on this, and his proposed improvement of the aiming system. It was a nasty one full of misunderstandings, but it was also enlightening about the aiming/cover mechanics (or lack thereof).
XCom: EU and TftD are very elaborate in their way to calculate projectile trajectories and aiming, but not very good at all at handling cover.