The bug
Command argument validation does not work for the entity id for the /summon
command. It appears to treat any value as valid. However, entity ids are validated when used in selectors.
How to reproduce
Copy the following in the chat
/summon non-existent
→ "non-existent" is colored, indicating that it is considered a valid value
effects in /effect are also not validated