What is the connection between mechanics and electrodynamics
The connection is that those are the same thing.
We know of four fundamental forces acting within the universe to make up everything we see and know: the electromagnetic force, the weak nuclear force, the strong nuclear force, and gravitation.
When talking about mechanics (i.e., our everyday, macroscopic objects ranging from spoons and forks, via machines, up to planets and everything else), we are talking about atoms interacting via one or more of those forces.
For your question, we can mostly ignore the weak and strong force (they act on a subatomic scale) and gravity (as long as we are not talking about black holes, supermassive stars etc., where gravity becomes strong enough to cancel out the other forces in a catastrophic matter).
This leaves us with the electromagnetic force. Atoms, together with electromagnetism, is what makes up everything we know, see, interact with in our daily lives. Everything from light, to electricity, to the fact that you are standing on the floor and not sinking into it, to friction, to the normal phases of matter (solid - fluid - gas ...), to combining atoms into molecules, and so on and forth, is all just atoms mixed with electromagnetism.
The reason why solid matter is solid, why metals behave like they do, how fluids flow, how gases disperse and so on, can all be explained just with electromagnetism (obviously gravity plays a role if planets or stars happen to be around, but it's just a sideshow).
As an example, the fact that the earth does not collapse on itself is because electromagnetism is there to resist the pull of gravity, hence leading to a solid but still somewhat loosely held together clump of material, instead of a black hole.
Therefore, your question "why do mechanics and electrodynamics both behave relativistic" is trivially answered by "because they are the same in the sense that they are based on the same objects (atoms) and electromagnetic force between them".