The reason the agent and seller disclosed the fact that the bath is non-permitted is it directly effects the value and usability of the home. In essence, you are paying for a 1/2 bath that legally doesn't exist. It is possible that there is a possibility with the e-permit information (assuming you're buying in Sunnyvale). So I would go to the building department and ask for a copy of the permits. If the city can't find them, I would then look to the construction of the 1/2 bath. Does it look like it was done correctly (check with the property inspector (and his/her report). If the construction is good and appears to be code complying, then I would try to get a permit retroactively through the city, but do not close escrow until you receive the permit and have verifed that it has been signed-off.
Can the city make you take out the bathroom or rebuild it to current building code? Yes, Are they likely to do it? Who knows. The city would need to be made aware of the situation.
If the home was damaged (fire, earthquake etc.) it is highly likely your insurance company would not pay to have the half bath rebuilt (remember it isn't legally there). To take it one step further...let's say you buy the house , then down the line, you move and rent it out. If something were to happen to the tenants because the 1/2 bath wasn't constructed correctly (ie.bad wiring), you just increased your liability 10-fold.
I would talk to your agent and get their take on it (and if they say its no big deal...fire him/her). I would also talk to a real estate attorney should you wish to proceed.
Solution, put a contingency in the offer stipulating that the seller get the permit on the bathroom or credit you back XXXX amount for you doing the same. Note: if the seller is smart, they will give you money as a credit versus trying to get the work done because once they start tearing things apart, the work can get more expensive. Good luck.
It is not difficult to get a permit (especially in Sunnyvale), but it does trigger a re-assessment of the property for tax purposes. Also, sometimes the contractor (handyman) who did the remodel doesn't pull permits on the work being done. The homeowner thinks that the work has been permitted, but it hasn't. Lastly, homeowners look to cheap solutions, versus what makes sense in the long run.
I wonder, why people make additions to the house, with no legal permits. Is it that difficult to get permits??? I see on campbell, santa clara city websites and it looks very easy to get the permits - so why would anyone go for non-permitted addition and take such a risk?