So, by design, all of your current carrying circuit conductors should not contact the steel hull.
Now, imagine two 12v light bulbs connected in series, connected to your 12 v system. Take the middle connection and attach that to the hull. If no other conductor in the 12v system contacts the hull, you will see two dim lamps. Now, a short develops between the hull and + 12 volts. One lamp goes off and the other goes to full brightness.
That is a ground fault detector in its simple form. Iíve done some design work on electronic ones but hopefully you get the principle.
Your question on the action of the panel lights is unrelated. That is simply some stored energy discharging thru the lamp. Capacitive charge or sometimes a running dc motor will do that. A bilge pump will do that if its running and you kill the breaker.