Nations should also decide in a way that is representative of the desire of the population.
Perhaps the population thinks the following:
"Just like private citizens, a nation should also be allowed to enter into contracts where all the parties agree not to do things [commit cyber crime/negligence hidden behind the veil of closed source software] to each other that none of them want to have done to themselves."
From the position of a free-trade agreement, it would be a statement of trust. We trust you enough to be our partner that we won't attempt to claw open your citizens' code if, in return, you don't do so to our citizens' code.
Entering such an agreement might be unwise, should a counterparty turn out to be disreputable or irresponsible.
Why not? Collaboration is far superior to competition as you can see Wikipedia beating Britannica and so on.
We just criticize it using our current capitalistic paradigm.
By making it a condition of allowing imports of the product, which is why that's exactly what the provision prohibits.