Having an agenda

This idiom or expression means:

Having something other than the obvious in mind.
Doing things for reasons other than what is announced.

A. I don’t know why Fred is suddenly interested in helping the poor!
B. He has a personal agenda. It’s not as if he is suddenly a caring man!