When a chest is broken in Minecraft how is the location of the dropped items determined?

Solution 1:

The initial position and velocity of the items are randomised and some of the items appear outside the chest.

Panda4994 made a video about this:

So I'm pretty sure you will have to leave air between the chest and the obsidian until this bug is fixed.