Many different factors are involved in a good paint job, from the right coating to knowledge of the substrate to the right paint professional. But, one of the biggest keys to a great and lasting paint job is surface preparation. If surface prep is done quickly and haphazardly, you're in for a good amount of trouble down the line, not to mention wasted money.
Bad surface preparation is almost like an invisible killer. You may not see it in progress, but it's certainly happening. Properly cleaning and preparing the surface will ensure that the coating adheres, and not just for a year or two, but many years down the line.
So, what goes into proper surface preparation? Well, many things, but first of all the right materials. And that means the right tools, equipment, and safety gear. (Proper training in lead paint removal is also necessary). Dirt, grime, old coatings and other things like chalking and efflorescence need to be eliminated. This work might require sanding, scraping, and patching, amongst other things. But, before scraping or sandpapering, the surface should be inspected for mold and mildew. If these contaminants are scraped or otherwise abraded, they will release spores, which will cause the mold and mildew to spread elsewhere. (Needless to say, a paint professional will know exactly what they are removing, and that is as it should be.)
Preparation may likely also include various types of abrasive blasting, like sponge blasting, dry ice blasting, etc. Cleaning may only require water and a household cleaner, but sometimes it may require stronger chemicals. That's where a paint professional with experience comes in handy. They'll know just what to do, and will save you a lot of headaches that could have easily been avoidable.