I think most people know where this is:
For those who don’t know where it is, I bet most have still at least seen this image. It’s of Yosemite Valley in Yosemite National Park in California. Notice the square shape of the valley. This is unusual because valleys tend to be formed by two things: rivers and/or glaciers. Rivers result in a V-shape due to their cutting action and glaciers result in a U-shape due to weight and grinding. So why is Yosemite Valley square?
The answer actually does lie in the geological activity of glaciers. When a glacier moves, it has a lot of mass and power behind it. That means it can easily bring tons and tons of rocks and debris along for the ride. Go on a hike anywhere reasonably far from the equator and glacial erratics will not be uncommon.
In the case of Yosemite Valley, a glacier moving through it brought more than a few erratics. In fact, it was more than just one glacier. Over millions of years many glaciers have run through the park, creating a massive lake where we see sheer cliffs in the first picture. On one end of this lake was a moraine, a collection of rocks pushed forward by the weight of all that ice. They built up on each other and formed what was essentially a damn. This allowed the lake to also form, filling in what was then a U-shape. Of course, that shape was still underneath all that water.
So the question that may be popping up from all this is, What is it that lakes do that is important here? The answer is that they create sediment. And with enough time, all that sediment adds up. In the case of Yosemite Valley, it added up to the point where it filled in that U-shape, creating the square we know today.