Let us analyse why Daniel refused to eat the King's food?
Daniel 1:3-5 explains how some of the young men from Judah’s royal family and the nobility were taken captive and were to be trained for three years then they would enter into the service of King Nebuchadnezzar. They were assigned a daily amount of food and wine from the king’s table. The reason why Daniel refused to eat this food and drink this wine is given in the NIV Study Bible notes:
“Israelites considered food from Nebuchadnezzar’s table to be contaminated because the first portion of it was offered to idols. Likewise a portion of the wine was was poured out on a pagan alter. Ceremonially unclean animals were used and were neither slaughtered nor prepared according to the regulations of the law.”
By providing food and drink from his own kitchens, King Nebuchadnezzar was trying to create a bond of dependence, gratitude and loyalty from the captives, but Daniel and his compatriots were having none of it. The NLT Study Bible comments that Daniel and his friends were not going to yield thier religious and moral independence to the king.