When putting a floating object in water, why the displacement of mass of water is not equal to only the part of the object inside the water? In this question Will a bathtub full of water weigh more if I add something that floats in the water? the marked answers mentioned a special case where the bathtub is full to a brim and the boat is put into it, floats and it weighs the same, justifying that the extra mass is the spilled water.
I can't wrap my head around the "The boat will displace a mass of water equal to the mass of the boat", If I imagine the boat as a rectangle where the mass is distributed uniformly and half of the rectangle is inside the water and half of it outside the water. Shouldn't the mass of water displaced be equal to half the mass of the rectangle, the part inside the water? Why is also the amount of mass outside of the water being displaced?
 A: It is called Archimedes principle
Principles in physics are a part of the extra axioms needed in order to be able to model with mathematics  physical observations, in this case the way the water (or fluid) is being displaced by the addition of an object in a bath of water.
A principle is the result of observing a physical phenomenon and finding out that a specific statement applies for all similar cases. At the time it was established as true, that it always worked , it helped in the progress we have made to the physics model we use now, where why this happens can be explained with more elaborate theories and different axiomatic assumptions.that make up the theory of thermodynamics, the concept of buoyancy.
We now describe matter in terms of temperature, volume  pressure, density ... and the axioms of thermodynamics are far removed from Archimedes principle, but it still holds because it depends on the observations of matter.


Buoyancy arises from the fact that fluid pressure increases with depth and from the fact that the increased pressure is exerted in all directions (Pascal's principle) so that there is an unbalanced upward force on the bottom of a submerged object.

you ask:

Shouldn't the mass of water displaced be equal to half the mass of the rectangle, the part inside the water? Why is also the amount of mass outside of the water being displaced?

It is a matter of density, grams per centimeter cubed.  For the object to float it has smaller density than water, otherwise if the density were the same  to water it would float below the surface or move anyplace in the bath, if larger, it would go to the bottom.
A: Imagine lowering your rectangular box into a bowl of water. When the box first comes into contact with the water, the upward force upon it from the pressure of water is less than its weight, so it will continue to sink into the water as you lower it.
As the box sinks, the level of the water in the bowl rises because the sinking box has displaced some water which is forced upwards.
There comes a point at which the weight of water that has been forced to rise above the surface level of the empty bowl equals the weight of the box. At this point the weight of the boat is balanced out by the weight of water that has been displaced upwards, so the boat will not sink any further but will float.
The volume of water that has been raised is equal to the volume of whatever part of the box is under the surface. However, the weight of the water displaced is equal to the total weight of the box.
