Actually, they are necessary, but in many cases the thermal protection needed for re-entry is enough for the heating caused by launch. However, it specifically was an issue in the design of the Apollo thermal protection system, which is described in Apollo Experience Report: Thermal Protection System.
Between April 1962 and the end of 1962, improvements in the material used for the heat shield reduced its density by 47%. However, the actual reduction in the heat shield weight was only 20%, because they forgot to consider the thermal protection needed during launch:
This represented a density reduction of 47 percent, but the corresponding reduction in predicted system weight was only 20 percent. The low rate of system weight reduction was caused by the inclusion of additional requirements (primarily the boost heating environment) which had been overlooked during the initial design phase.
p. 14
After the Apollo 1 fire, the spacecraft was redesigned. One improvement was to put a boost protective cover over the command module during launch. One of the purposes of the boost protective cover was to handle the heating loads during launch:
Originally, the Block I TPS included approximately 0.12 inch of additional ablator thickness to allow for the charring that would occur during vehicle exit flight. In October 1963, the Apollo Program Manager agreed to a design change that incorporated a boost protective cover over the conical portion of the CM (fig. 5). The boost protective cover was attached to the launch escape tower and was jettisoned with the launch escape tower.
p. 17
This allowed a reduction of the forward heat shield thickness, significantly reducing the overall weight:
The Block II design, which resulted from these changes, showed a decrease in TPS weight of approximately 200 pounds (fig. 11). This was achieved by (1) the elimination of the effects of boost heating environment by the introduction of a boost protective cover that was jettisoned with the launch escape tower (fig. 5),
p. 14
See also this answer.