Did Abraham go to Egypt only to get food?

No, he went down to sojourn and set up camp in Egypt, not merely to get food.

Watch the Teaching: Why Should a Wife Submit if Her Husband is Wrong?