If you are a buyer and are concerned about unpermitted additions make sure you ask. When you get your appraisal done, if the appraisal square footage differs from the square footage on the assessors records then definitely investigate to find out why.
I had a 3/1.5 home and I converted the half bath to a full bath. I ended up removing the closet of a bedroom to put the bathtub/shower in. I hired a licensed contracter and plumber and had all of the work done professionally but no I did not get a permit for the work which technically I should have.
So yeah I agree with points made that it is a matter of buyer beware. To me at least, the scope of the job and the quality of the work does have bearing. Again as a buyer you can do a pretty thorough job of investigation. If you are uncomfortable, walk. However don’t not look at a property simply because it may have had some unpermitted work.
And yes as a seller, disclose disclose disclose!!!