A textured wall or ceiling has ridges, bumps and other designs. Without primer, the texture absorbs the paint unevenly in different spots across its uneven surface. Afterward, it is left with an uneven appearance, appearing lighter in some spots and darker in others. This is more about the texture than about the paint. If you apply a primer to the textured surface first, the primer gives the paint a smooth coat to adhere to. This results in a much more consistent appearance across the entire surface.
Because water-soluble textures wash away over time, and will experience cracks and peeling, especially in areas of high humidity, painting helps prevent the texture from breaking down because it absorbs moisture. For this reason, you should normally paint over textured surfaces in rooms where daily activities add to air moisture, such as bathrooms and kitchens. In addition to protecting the adhesion of the texture to the wall or ceiling, paint also protects against marks that could be caused when objects bang against the texture.
Although it is recommended to prime the texture before you paint it, it is not always particularly needed. Always read the product label and instructions to find out for certain if the texture manufacturer says that priming is necessary. With some manufacturers, priming over the texture is not required before you paint. Keep in mind that while it's not necessary, the textured surface you are painting is already uneven, so priming would only help to ensure an even appearance to the coat of paint.
If you need to remove texture to complete repairs or to redo a ceiling, also be aware that the paint makes the texture more difficult to remove than unpainted texture. With unpainted texture, you can often simply apply water with a few drops of liquid dish soap mixed in onto the texture and loosen it up. You then can scrape the texture off with either a scraper or a broad knife. With painted texture, use a chemical paint stripper to loosen the paint. Make sure the room is well-ventilated, and also protect yourself by wearing any necessary personal protective equipment recommended by the manufacturer, such as an organic vapor respirator.