"What if Daniel and his companions had made a compromise with those heathen officers and had yielded to the pressure of the occasion by eating and drinking as was customary with the Babylonians? That single instance of departure from principle would have weakened their sense of right and their abhorrence of wrong. Indulgence of appetite would have involved the sacrifice of physical vigor, clearness of intellect, and spiritual power. One wrong step would probably have led to others, until, their connection with Heaven being severed, they would have been swept away by temptation. SL 23.2"
"Know ye not, that to whom ye yield yourselves servants to obey, his servants ye are to whom ye obey; whether of sin unto death, or of obedience unto righteousness?"
The EGW passage illustrates the principle of Romans 6:16, that yielding to a particular course of action makes one a servant to it. Daniel's potential compromise would have made him a servant to Babylonian customs, weakening his spiritual resolve. The connection is strong and meaningful.