Richelieu being threatened with death, in particular by Gaston of France, Louis XIII ordered him to create personal guards who gradually became a body of musketeers for his service. He preferred to have his own guard in the colors of the Church, i.e. red. The king's musketeers depended on the captain of the musketeers, while those of the cardinal depended on him directly.
Originally, he was protected as a minister by the King's household. After the Chalais conspiracy (1626), Louis XIII endowed Richelieu with a personal guard of 50 arquebusiers. They obviously do not have the right to protect him in the presence of the king, since the bodyguards then ensure their common protection. Note in passing that the musketeers are not responsible for the immediate protection of the person of the king, but more of the service inside and outside, that is to say messengers and protection during travel.