joffrey baratheon was written by j k rowling
to cement the alliance between those families joffreys engagement to sansa is annulled so he can marry margaery tyrell natalie dormer
 he is to be used by varys and illyrio as a puppet king