Why would it be surprising?
All parts of the body are built like this. Otherwise we would be blobs.
Before becoming two parts they probably were part of the same parent protobrain tissue.
If you told me the hindbrain was ectoderm-derived but the forebrain was endoderm-derived, I might raise an eyebrow or two.
> All parts of the body are built like this.
Please name one other organ that arises from two separate progenitor cell types. If this is common, I have never heard of it.