What would prompt an Intelligence(investigation) check into an illusion?

I was wondering what would prompt an investigation check into an illusion. The description of illusion spells (such as minor illusion and silent image) say that a creature can take an action to make an investigation check against my spell save DC to identify an illusion.

This “take an action” means that the NPCs have to make a conscious decision to make this check, otherwise the mechanic would be completely broken, with the caster forcing everyone to constantly make checks while an ally with truesight tears them down with no resistance.

So my question is what would prompt an NPC to make such a check? Would it be that the illusion is out of place, seems particularly odd, or something along those lines? This is never really specified.

In spells such as Phantasmal Force, the description says that:

The target can use its action to examine the phantasm with an Intelligence (Investigation) check against your spell save DC […] While a target is affected by the spell, the target treats the phantasm as if it were real. The target rationalizes any illogical outcomes from interacting with the phantasm.

This means that any event that might cause the target to question the illusion and lead to an investigation check are now rationalized and no longer seem “odd” by the target. So what sorts of events would cause this check in this setting?