Avoid destructive operations on quoted objects. Quoted objects are literal objects. They are possibly embedded in the code in some way. How this works and the effects of modifications are unspecified in the Common Lisp standard, but it can have unwanted consequences like modifying shared data, trying to modify write protected data or creating unintended side-effects.
(delete 5 '(1 2 3 4 5))