I've been playing for about a year, and here's my observations:
Shooting through buildings, trees, hills and stuff does APPEAR to happen. Perhaps it's my POV from my position in the vehicle, but it sure looks like it.
You have correctly identified it: It appears to happen. The reasons are lag, your front end vs his front end etc.
Examples
We both are in tanks, I shoot at you while your trying to dash behind a building to take cover. Due to the usual internet lag, you (on your screen) may have been already behind the building while on my screen you were just a few yard away, when my shell hit you.
Thus it appeared to you as I were capable to shoot through the building.
Shooting through hills:
Another favourite one. You're taking cover behind a hill, I spot you cupola MG and start to shoot. Due to the cannon's ballistic trajectory I basically "lob" my shells over the hill at long range. But on your screen it may seem as if my rounds just go through the top of the crest.
Reason. Only ones own shots are computed/rendered in detail. When a enemy shoots you, your computer basically just gets told what has happened on your enemies screen. This lesser somewhat reduced accurateness, combined with the inevitable lag, can lead to that kind of results.
Ever watched another tank shooting your town? Next time do observe it carefully before dropping your bomb: You will actually see the enemy's shells go through the town and hit the ground behind it, as if he was uncapable of hitting a building, yet the buildings will explode one after another. This is the very same effect.
Shooting through trees:
Similar to the hills example above. Also take note that the shell trajectories are no perfect parabolas, thus it's indeed possible that an enemy tank that is sitting right under a tree may be able to shoot at you while you can only hit the foliage. The shell's angle of departure is smaller than the angle of incidence at long ranges, the steeper angle of the incoming round may lead to hitting the foliage only.