Declaring war on distant faction makes all close factions feel "betrayed"

Everyone suddenly declared world war on me and I didn't know why. Going back through saves and I realised that when I declared war on a distant faction all my close trading partners suddenly felt betrayed and started plotting against me.

Is this because they were buddies with the people I went to war with? How can I see this in the future if this is the case?