That horseshoe magnet is really made up of innumerable tiny magnetic atoms/molecules, ferromagnetic things like FE, Ni, Co, Nd... Each of these tiny magnets is aligned N-pole to S-pole. The magnetic flux they create is channeled through all of that magnetic material until it ends at the N and S poles of the horseshoe. Then in order for the magnetic flux to make a complete circuit (which is what magnetic flux always has to do) it has to travel through the air to get to the opposite pole. So, the thing that makes that appear like a magnet to you is that you, or other materials, have access to the unrestrained magnetic flux. So if you bent the magnet until the N & S poles were touching, the whole magnet would act like the center section did before you bent it. It's still a magnet, the flux is still in there, you just can't get to it very easily.
You can try some experiments to see this. You can test the availability of the flux by seeing how well it attracts iron/steel objects. See if you can extend the N pole of the magnet by putting a steel bolt on the end; are other bolts attracted to the original N pole, or the new one you created at the end of the bolt? This is like what the atoms in the middle of the magnet are doing too. Then attach the magnet to a long iron/steel bar that connects the N & S poles and test how well it attracts other objects this way. In this case you have contained the flux through it's entire path so very little is available to travel through the air. Now try some of these experiments with aluminum, wood, or plastic and see if that works too. Magnetic flux travels more easily through iron than air (this is a material property called permeability or reluctance), so you can control where it goes with different materials, kind of like electrons in a circuit.