Interesting question! The answer lies in the fact that you're expressing your areas with respect to different parameters: in the circle case, you use the radius, and in the square case, you use sidelength. However, there is an analogous construction for the square which does hold!

Consider the lines from the centre of the square to the midpoint of each edge. These clearly have lengths , and partitions the square into 4 smaller squares, each with sidelength , and area . The area of the original square is , and taking the derivative with respect to shows that , as you might expect.