I was looking at the morphology of different animals when I found that apparently part of the reason vertebrate mammals have toes is that they grip the ground. But, why is that better than having a solid foot with no toes if friction increases with the surface area in contact with the ground?
I would say that the premise that "the surface area of contact with the ground increases in case of solid foot" is incorrect.
In practice, the ground is very far from being even and flat, and the animals need to navigate themselves throughout different terrains that include very uneven ground, stones, growing & lying plants, etc. In that case, having toes, in general, offer an advantage of gripping to the ground (and increasing contact area in multiple directions) in a large set of terrains. Then, different animals will develop their toes in different shape/form tailored to the dominating usage (including, but not limited to gripping the ground).