I have always understood there to be two classes of hacks in Judaism.
The impermissible class circumvents the spirit of the law.
The permissable class clarifies what the spirit of the law actually is.
The spirit of the Shabbat law is to rest and resting is defined as refraining from a set of 39 categories of labor. One of these categories is transferring an object from one domain to another. But is it really labor to carry a cake to a friends house as a gift when attending a meal? Is it labor to push a child around in a stroller?
The loophole of Eruv is intended to enable Jews to define communities by drawing a string around them and demarcate a logical line of what constitutes labor vs not on Shabbat as a something external to the community vs external to the home. This is a psychological exercise to force Jews to understand the boundaries of their communities so as to protect them from actually performing labor and preserving the sanctity of Shabbat.