Why do automatic bone weights paint distant meshes
Yes, there are some issues with your work. Several objects have their origins misplaced, rotations and scale unapplied, non-uniform scales, ... You must always fix this before even creating the armature. And never scale your armature unless the rigging and skinning are completed and you really have to.

Also, automatic weight never does a perfect job, and it surely works better when you have your bones and meshes correctly placed, not set in a pause which may lead to confusions (like the arms stuck along the body) and with enough bones and vertices to make the assignations obvious.

In your case, you have a very simple mesh and with not mathematically logic needs for the weights, so you will be way faster by assigning your weights in edit mode or weight paint.