The more direct solution would be a law that required distributing human-editable code alongside software. No need for copyright or anything remotely similar. Code being copyrightable would just be getting in the way at that point.
But in a world where that is politically infeasible, we have to use whatever tools we have at hand to get as close as we can. And, unfortunately, the tool we happen to have is the modern copyright regime.