Note that the eyes are extremely quick at changing their light sensitivity. Besides changing the pupil size, they can also chemically adjust their sensitivity. And that is a very, very quick reaction.
This means that when the sun changes, you can still look at the building and perceive similar light levels. Then you look back at the clouds and your eyes instantly adapt so you perceive similar light levels there too.
The camera is no where near able to match that performance. So it sees the sky with similar exposure on both photos, but will have an exposure setting for the complete image, which means the building will show a large difference.
It really is very deceptive that our eyes dynamically change their light sensitivity as you change spot to look at. This makes you see in real life a view that is completely different from what the camera catches - all because the camera has the same exposure used for sky and building, while your eye changes "exposure" depending on if you look at sky or building.
In short - you can totally miss several stops of changes in overall light levels unless you have a clear reference to compare with. So we see strong differences between shadow and light when an object casts a shadow. But we do not see the strong differences when everything has changed between shadow and light. And the tricky things with clouds is that they sometimes allows the sun to get hidden smoothly, and sometimes there are a visible edge between light and shadow.