Is this double tap for a subpanel a problem?
My bet is your panel is full and someone wanted to add the shed subpanel anyways so they simply fed it into the utility connection to the panel. There's several problems here


They're mixing aluminum and copper. This is dangerous because the wires can corrode like this. Corroded aluminum is a fire hazard
There's no way to cut the subpanel off. I'm sure someone can quote the relevant NEC, but there's a few reasons you connect wires in the panel to a circuit breaker, and one of them is you want to be able to cut the power to that wire
Even if the subpanel has a breaker, there's a risk that the wires double-tapped can exceed their design limits (which is the other major function of a breaker). If they do, the insulation can melt and now you have unrestricted current flowing straight from the utility, likely meaning fire.


If your panel is full, you'll want a subpanel by the main panel to hook this to. That likely means you'll need an electrician. It's a mess, but I wouldn't leave this as-is.