Dan 1:5-6, 8 And the king appointed for them a daily provision of the king's delicacies and of the wine which he drank, and three years of training for them, so that at the end of that time they might serve before the king. Now from among those of the sons of Judah were Daniel, Hananiah, Mishael, and Azariah... But Daniel purposed in his heart that he would not defile himself with the portion of the king's delicacies, nor with the wine which he drank; therefore he requested of the chief of the eunuchs that he might not defile himself.
Though Daniel was living in luxury and sharing the goodies meant for the king, yet he stayed faithful to His belief in Yahweh. He would rather be a vegetarian than eating the delicious food which was unclean. No wonder he was considered a righteous man along with Noah and Job in Eze 14:14, 20.
Unfortunately many Christians today call some abominations as blessings from God because they enjoy indulging in these lusts and sinful practices.
Luke 16:14-15 Now the Pharisees, who were lovers of money, also heard all these things, and they derided Him. And He said to them, "You are those who justify yourselves before men, but God knows your hearts. For what is highly esteemed among men is an abomination in the sight of God.
Dan 1:10,12-14 And the chief of the eunuchs said to Daniel, "I fear my lord the king, who has appointed your food and drink. For why should he see your faces looking worse than the young men who are your age? Then you would endanger my head before the king."... "Please test your servants for ten days, and let them give us vegetables to eat and water to drink. Then let our appearance be examined before you, and the appearance of the young men who eat the portion of the king's delicacies; and as you see fit, so deal with your servants." So he consented with them in this matter, and tested them ten days.
Daniel, a man of wisdom, pleaded with the eunuch who was in charge to test him for only ten days. If his appearance was worse than the others, he would submit to whatever decision the eunuch imposed.
Daniel did not mention Yahweh for he knew that no gentile will believe Yahweh is the Almighty God because the Israelites were defeated by the Babylonians, whose God was supposedly greater and more powerful.
Simirlarly, a sinning Christian (drunkard, gambler, drug addict, etc.) is not effective in preaching His gospel while drinking or gambling with them. Until he has repented and has been transformed will his testimonies be effective for then, the non believers can see the miracles of our Almighty God working in him.
Dan 1:14-16 So he consented with them in this matter, and tested them ten days. And at the end of ten days their features appeared better and fatter in flesh than all the young men who ate the portion of the king's delicacies. Thus the steward took away their portion of delicacies and the wine that they were to drink, and gave them vegetables.
Non believers can only believe what they can see. So when the eunuch saw that the four Jews were healthier than the others, he was convinced and allowed them to be vegetarians.
Note - as Christians we walk by faith in the word of God and no longer by sight.
Mat 5:6 "Blessed are those who hunger and thirst for righteousness, for they shall be filled."
Whenever a Christian sincerely wants to be righteous (obey His words and will), God will be delighted to fulfill his desire.