As @Ecnerwall says, definitely not safe / legal / advisable.

My guess is that the guy kept tripping breaker #4 (maybe too many power tools in the garage?) and decided to share the load with another breaker by adding the extra wire. Approximately half of the current will flow through each breaker, effectively creating a 40 amp breaker.