That the retainer cannot exceed your own level in the same class is certainly intentional and is even explained in the in-game help screens that come up when you first unlock retainer ventures and classes. The five-level gap, however, that stops your retainer's level several levels below your own, does not match the way the game describes the system. It's what players have figured out based on where many people's retainers seem to be stuck, but the fact that it doesn't match the in-game descriptions of the feature suggests that it could be a bug.