The Whole Justification for Sanctuary Cities Is Wrong

We have been told that sanctuary cities are set up to protect illegals from deportation and are productive citizens. Is this true? Are these policies hurting illegals and citizens or helping them?