As with barking, dogs who whimper or whine are trying to communicate.
Excitement, anxiety, frustration, pain, attention seeking, and resource solicitation are all common reasons dogs whine at their people.
So it's no wonder adult dogs recruit this same vocal impulse when communicating with their people.