How are these chickens smarter than I am?

How is it that they are smarter than I am?
As you can see I built a two level coop with an attached (enclosed) run and have built a much more klugy run along the side of the house, which is what they were escaping from… Since improved with stakes (so I hope).