Well, before we sold our previous house in 2021, I had a new roof installed. Just before the new owner closed on it, I was informed that the permit for that roofing job hand never been closed, despite the job being completed almost 60 days before that. The sale couldn't close until the permit was closed. I made a call to the building authority in that town, since I had already moved. They had no record of the sign-off on the permit. I checked my phone, though, and found the call from the inspector, who had called me after doing the inspection. I called him and explained that the permit was still open. So, he checked. Someone had typed in the wrong address at the building authority office, so the permit was never closed.
It matters. You have to stay on top of that stuff, and various inspections that happen around a sale can turn up things that were done improperly or without a permit, and the title search shows any open permits. Everything seems to happen just before the closing date, too, so it's often a scramble to get things wrapped up.
Yes, you can do a lot of things without a permit, but if you don't do them correctly, it's likely to be discovered during a property inspection and bollix up the whole deal. If it was done correctly, odds are it won't get discovered, but a major project that should have had a permit isn't going to squeak through. It might, but it might also kill the sale, in the end.