Normally, when an object is deleted, all references to this object are removed (it automatically disappears from reference attributes that previously referenced the object when it is deleted).
If you use transient objects in the GUI, this cleanup does not work. If the transient object references a persistent object that has been deleted in the meantime, the now dead reference is still displayed when accessing it and scripts that access this object crash.
Solution
As not all places where this object is referenced from transient objects can be found when a persistent object is deleted, transient objects must sort out references to objects that have been deleted in the meantime when they are accessed, so that accessing a transient object can never return references to deleted objects.