Why is the Cangjie code for 海 inconsistent?
There are many rules for the Cangjie input method.
The one you don't understand thoroughly is the rule of omission.


  Omission in enclosed forms: when part of the character to be decomposed and the form is an enclosed form, only the shape of the enclosure is decomposed; the enclosed forms are omitted


Take a look 倉頡輸入法/取碼原則


  2 省略大原則
  2 The rule of omission
  
  2-2 包含省略：
  2-2 Omission in enclosed forms:
  
  尾碼被「外框」字根包住，且「外框」尚未被取完時，以「外框」的尾碼取代之。
  When the last code is enclosed by the frame radical and the codes of the frame are not completely taken yet, it is replaced by the last code of the frame.




The left and right ends of the "亠" protrude outward, therefore it is counted in the frame.