The allowance of being able to declare your variables anywhere inside the body of a function may have been brought about by changes in compiler design.
Declaring everything at the beginning fits with the "one variable, one memory/register location" model that is extremely simple to implement in a compiler (especially if you restrict it to memory-only) but relatively inefficient. Allowing declarations in the middle makes the code more SSA-like and possibly better for the code generator/register allocator to handle.
Ideally, it shouldn't matter where you declare the variables, because they'll only be instantiated for the duration they're actually used - as a "flow of data" between computations.