The window switches on these cars have quite a tendency to go bad (do a search on the boards). One option to fix it is to short two of them together so they go up together (as is yours), another is to search the junk yards (tough part to find), and the third is to buy a new one from Mazda (at ~$130).
When mine went out I had it rigged as yours until I found a used one. I'll bet your's is done because your switch is bad, too. If you really want to know how the switch works let me know and I'll dig up the schematics I had for it (I may have already posted them, do a search), but it's probably not worth your time to mess with it. Just get another one or live with it as is.