Ganged Circuit Breaker has strange ganging configuration. 40-[30-30]-40
This is a bit backwards, but OK as long as the breakers have a common trip mechanism inside them

Normally, you'd see this configuration as a 30-40-40-30, but either way, this is a quadplex breaker, where the outside half-poles are ganged together to form 1 240V circuit while the inside half-poles are ganged together to form the other 240V circuit.  You wouldn't get anything good out of the other configuration, as the two upper half-poles connect to the same bus stab (i.e. are on the same leg), and likewise with the two lower half-poles.  The crazy-looking handle-tie (what you call a "ganging clip") is manufacturer-supplied, and normal for this type of quadplex breaker -- it allows the handles to be operated together when you operate them by hand.  Common trip is handled by an internal mechanism, however.

As to why someone would do this? They simply ran out of panel space -- this is also evidenced by the large quantity of double-stuff breakers in the panel.  (This is why putting in a panel that barely fits is penny-wise and pound-foolish, especially for the main panel in a building.)  It's OK by Code as long as the panel is labeled and listed to accept double-stuff breakers in those two slots -- check your panel labeling for details.