The reason for the enslavement of the Israelites in Egypt is given in Exodus 1:8-14. A new Pharaoh arose "who did not know Joseph" and observed that the Israelites had become very numerous and mighty. He said to his people: "Look, the Israelite people are more numerous and more powerful than we. Come, let us deal shrewdly with them, or they will increase and, in the event of war, join our enemies and fight against us and escape from the land."
Pharaoh's motivation was fear. He was afraid the rapidly growing Israelite population would outnumber and overpower the Egyptians, or ally with Egypt's enemies in wartime. To contain this perceived threat, he imposed forced labour on them, setting taskmasters over them to oppress them with heavy burdens.
Joseph had actually helped Egypt during an earlier period of famine, but this new Pharaoh had no loyalty to Joseph's memory. The Bible gives no indication that Joseph advised enslavement, that the Israelites refused to pay taxes, or that they disobeyed Egyptian gods. The sole reason stated in scripture is Pharaoh's fear of their growing numbers and potential military threat.