When Pharaoh calls you and says, ‘What is your occupation?’ you shall say, ‘Your servants have been keepers of livestock from our youth even until now, both we and our fathers,’ that you may live in the land of Goshen; for every shepherd is loathsome to the Egyptians.” (Genesis 46:33-34).
At first, you might think that Joseph did not want his brothers to say that they are "shepherds," because this profession is "loathsome to the Egyptians." But it is just the opposite. It is for this very reason that Joseph wanted his brothers to say that they were shepherds. After all, this is what Joseph said he would tell Pharoah, namely, that they were "shepherds" (Genesis 46:31-32).
But why would Joseph want the Israelites to be looked upon with disdain? In the immediate context, it's so that they might live in the land of Goshen, but a larger reason may be (1) to keep their national identity pure, unmixed with the Egyptians, and (2) to keep them spiritually and morally pure, separated from the idolatries of Egypt. A similar comment comes from Keil and Delitzsch Biblical Commentary on the Old Testament on this passage:
At the same time Joseph gave these instructions to his brethren, in case Pharaoh should send for them and inquire about their occupation: "Say, Thy servants have been keepers of cattle from our youth even until now, we like our fathers; that ye may dwell in the land of Goshen; for every shepherd is an abomination of the Egyptians." This last remark formed part of Joseph's words, and contained the reason why his brethren should describe themselves to Pharaoh as shepherds from of old, namely, that they might receive Goshen as their dwelling-place, and that their national and religion independence might not be endangered by too close an intercourse with the Egyptians. The dislike of the Egyptians to shepherds arose from the fact, that the more completely the foundations of the Egyptian state rested upon agriculture with its perfect organization, the more did the Egyptians associate the idea of rudeness and barbarism with the very name of a shepherd. This is not only attested in various ways by the monuments, on which shepherds are constantly depicted as lanky, withered, distorted, emaciated, and sometimes almost ghostly figures (Graul, Reise 2, p. 171), but is confirmed by ancient testimony. According to Herodotus (2, 47), the swine-herds were the most despised; but they were associated with the cow-herds (βουκόλοι) in the seven castes of the Egyptians (Herod. 2, 164), so that Diodorus Siculus (1, 74) includes all herdsmen in one caste; according to which the word βουκόλοι in Herodotus not only denotes cow-herds, but a potiori all herdsmen, just as we find in the herds depicted upon the monuments, sheep, goats, and rams introduced by thousands, along with asses and horned cattle.