If we have to be pedantic, France declared war over Prussia. Germany did not exists at the time.
And because Prussia mobilized much more effectively, it attacked France first.
And because Prussia mobilized much more effectively, it attacked France first.
You are right that behind words like "attack" or "Germany" they are complex human interactions that are hard to understand in retrospect, but I fell obligated to push that discussion a little further: https://en.m.wikipedia.org/wiki/Ems_Dispatch
Have a good day.