`command2` is not "dangling", it is a post-up option for eth0, so it will be executed right after `command1`. From man interfaces:
> Options are usually indented for clarity (as in the example above) but are not required to be.
Also, empty lines are ignored in `/etc/network/interfaces` (and in all included files).