@Rhin
I actually disagree that it's "bad writing". The level caps exist for the magic system as they know it.
So it was reasonable of the magic association to think that he wouldn't be able to grow past a certain point even if he tried. Even more so with his magic sealed.
But this guy reinvented a whole new concept of "magic" from scratch to pull this off.
Imagine people going around on bicycles. You go fast, but there is a limit to how fast a human can pedal.
Then someone gets his legs taken away. No more pedaling.
He then invents an engine to pedal in place of his legs... basically inventing the motorbike... and reaches speeds immeasurable before.
The idea is that people were using magic in a constrained system and didn't realize it.
In a prison, without his magic, he had to rethink things from scratch, and found a way to use magic that is free of the constraints everyone thought as absolute.
And that was only possible because he was given near infinite subjective time to think about it, along with the handicap of being unable to use his previous magic.
I agree that was a "dumb punishment", but it is not necessarily "bad writing". At least not when it comes to the magic. It's a writing issue in the punishment that was devised here.