Let's start with a hypothetically perfect scenario.
We have a perfect barrel. The outside is round and true. The bore is perfectly round and concentric to the outside diameter. The bore runs straight through the center of the barrel. The barrel is pointed perfectly at a .001" dot that is 100 yards away. There is no wind, no mirage, no heating effect of the air, the only things that will affect the flight of the bullet are the resistance of the air as the bullet flies through it and gravity. Magically gravity does not affect the barrel so it has no droop. The barrel is in an ultimate Benchrest rig so that it is perfectly aligned to the dot on the target.
The bullet fired from this barrel will miss the target because gravity will cause the bullet to drop slightly.
To compensate for this we will raise the muzzle. The bullet will now leave the barrel in an upward direction.
As we increase the distance, 200 yards, 300, 400, 500, 600, 1,000, we will need to increase the upward alignment of the barrel to compensate for the effects of gravity so that the bullet hits the dot on the target.
At each of these distances the bullet, as it passes through the target, is not perpendicular to the target, yet as long as it is adequately stabilized, it does not make an oblong hole in the target.
This is because (and I am oversimplifying here, the actual attitude, rotation, nutation, precession and so on are quite complex) the bullet is generally aligned to it's flight path. When the flight path is upward, the alignment of the bullet is generally upward. After the bullet passes the apex of its trajectory, the path of the bullet will be downward and the alignment of the bullet will be generally downward.