All those little tricks you described are part of a strategy usually called Conversion Rate Optimization. They do this because it works. What you described was likely A/B tested. Some visitors to the site saw the nagging message, while others didn't.