‘Partly for some other purpose’ makes it meaningless.
This refers to a federal election that includes non-federal offices such as State Senator, Assemblyman etc. An alien can vote for these offices IF the state law permits it, but cannot vote for any federal office (President, Senator, Congressman).
But again, sub-section (c)(3) is what really gets me. If the alien “reasonably believed” he was a US citizen? What I find hard to believe is that any Republican voted for this law.