I haven't looked at the California legislation, so I can't comment on it. I have looked at the Peruvian legislation, so I'll restrict my comments to that.
Interoperability is a very import facet of the government. Unlike any given business, wherein it could be argued that interacting with them is optional (you don't *have* to do business with anyone), interacting with the government is often not optional. So requiring the government to use software which can inter-operate with any software is rational, even required.
Consider the following, not unlikely, case. The government decides to go over to 100% electronic filing (save the trees), and since the government uses Microsoft Office, it decides that the format to submit your taxes in is Word, with appropriate macros and forms etc. Doesn't the government have the right to use any software it wants? Except that since paying taxes is not optional, using Word is no longer optional. I no longer have the freedom to *not* use Word. Although Bill Gates may desire a world where not running Word means large fines and jail time (for the nominal crime of being unable to pay your taxes), this does not well serve society as a whole.
The Peruvian legislation does not, despite common misunderstandings, actually require open source software. It simply requires that the government *not* mandate what software the individual uses (plus reasonable national security and promotion of the local economy requirements). If Microsoft is unable to meet those requirements than the government should not use Microsoft products! If Microsoft is able to meet those requirements, then they have nothing to worry about.
The other requirements of the Peruvian legislation are equally rational. Peru has as much right to defend itself, and protect it's secrets, as the United States. Put the shoe on the other foot for a moment to try it on- what would you think if the United States national security was completely dependent upon Peruvian software. Worse yet, allegations surfaced that the Peruvian government had pressured the software makers to include back doors in the software, allowing the Peruvian government to spy on the United States government (the infamous Peruvian Security Agency key, a.k.a. psa_key, debacle). Of course, the source to this hypothetical software is not available to anyone in the United States, being the jealously guarded secret of the original Peruvian company. Viewed in this light, what is surprising is not that the Peruvians are contemplating taking this step, but that the national security organizations of every other country on planet did not take this step years ago.
Likewise, a Peruvian legislator voting to create jobs in Peru is about as surprising as a California legislator voting to create jobs in California. What would be surprising is a California legislator standing up and saying "No! Rather than creating jobs in California, we should create jobs in Minnesota- or better yet, we should create jobs in Peru!" Such a legislator would, no doubt, very rapidly have more time to spend with his family, and write his memoirs. Perhaps Microsoft should consider how many jobs it creates in Peru- and Argentina, and Britain, and Germany, and China, and Korea, and all the other countries. Come to think of it, maybe they should also consider how many jobs they create in the other forty nine states.
I whole heartedly support the Peruvian legislation as a model for the entire world- the United States included.