Why does the grated coconut "float" to the top of quindim while baking?
While the mixture is raw, the density of the batter is more or less equivalent to the density of the grated coconut, and the batter is fluid, allowing movement.

During cooking, the egg protein in the batter denatures and coagulates, generating a dense colloidal matrix that doesn't allow movement. As this process is happening, the proteins are aggregating to themselves and pushing the coconut to the top (it is pushed up since it is less dense than the newly-forming colloid). 

A similar phenomenon happens with you put raisins, other dried fruit in batter (like in fruit cake or panettone), but they are pushed DOWN instead of up. Coating them in flour prevents them from sinking not because of the change in density, but because it gives anchoring points to the matrix to form around the fruit instead of pushing it.