It you’re talking about the intrusive stuff that gets in the way of you using the website, then the answer to this is pretty simple: they don’t. The sites that do that are comparatively rare. They just appear more numerous than they really are because it’s the really big sites like Reddit that do it. The norm is either a page on the site that tells you about the app, or the banner that appears at the top of a page.