AIs issue you missions that involve attacking other AI players if it doesn't involve giving resources. Usually, if you keep on pressing against one AI player, another will begin to like you for completing the missions it gives you, regardless if you intended to do them or not.
What's funny is that looking at recordings, I've noticed that the missions the AI gives me involve attacking another AI that they have formed a peace treaty with. In effect, they were using me to move their secret agenda forward.