The infinite wisdom behind our most foolish choices