Magnets have a lot of uses. I don't keep one in my kit mainly because it could interfere with the compass or electronics.
A trick for getting a magnet on a string through a steel grate or other tight spot surrounded by magnetic metal is to roll up a piece of cardboard or stiff paper to form a tube. You pull the string through and pull the magnet up tight. Then you use the tube to push the magnet well past the metal. Once free the magnet can be allowed to drop free of the tube. The stiff tube also allows finer control over the string, in case the hole you went in through isn't exactly plumb over your target, as you fish for your lost keys.