it's not a loophole, it just abuses the fact that minecraft will not check if a item that the client says they have is valid or not while they are in creative mode, therefore replicating the action to the server at the cost of items being able to be created with lore.
one solution would be a plugin which detects items with lore and instantly destroys said item