There were some among the Philistines who stood ready to oppose the return of the ark to its own land. Such an acknowledgment of the power of Israel's God would be humiliating to the pride of Philistia. But “the priests and the diviners” admonished the people not to imitate the stubbornness of Pharaoh and the Egyptians, and thus bring upon themselves still greater afflictions. A plan which won the consent of all was now proposed, and immediately put in execution. The ark, with the golden trespass offering, was placed upon a new cart, thus precluding all danger of defilement; to this cart, or car, were attached two kine upon whose necks a yoke had never been placed. Their calves were shut up at home, and the cows were left free to go where they pleased. If the ark should thus be returned to the Israelites by the way of Beth-shemesh, the nearest city of the Levites, the Philistines would accept this as evidence that the God of Israel had done unto them this great evil; “but if not,” they…
"And Moses and Aaron came in unto Pharaoh, and said unto him, Thus saith the Lord God of the Hebrews, How long wilt thou refuse to humble thyself before me? let my people go, that they may serve me."
Both passages involve a warning against stubborn resistance to God's will, drawing a parallel between the Philistines and Pharaoh. The connection is thematic, highlighting the consequences of refusing to humble oneself before God.