How domestic politics influence foreign policy

Many attempts at UN intervention in internal conflicts have not been supported by China and Russia. Examples include the military interventions in Kosovo in 1999 and Libya in 2011 as well as the ongoing civil war in Syria. What explains this lack of support? Is it based on realist concerns about power, liberal understandings of how domestic politics influence foreign policy or other factors?