there is an asian tradition in the olden monarchy era where they will put a replacement for the monarch (either the other twin or someone that perfectly looks like the other) for protection purposes and so the mangaka most likely derived it from that. also, there is an asian superstition that a twin borne in a royalty means bad luck
There are lots of stories where twins and royalty do not mix. Bad luck, or just the fear that it would cause an upheaval in the kingdom. In the Man in the Iron Mask, the Prince's twin was hidden away for that reason. But fearing that he would one day attempt for the throne, he was thrown into the Bastille and forced to wear an iron mask to hide his identity. The Prince was not a good guy, so eventually the twin got free and their places were swapped. At least this story had a good ending with the brothers (and neither was really a bad guy)
If they're brothers how come one is prince and the other is a prisoner? Wouldn't they both be princes?