Basically you need a certain level of insulin at all times for your body to remain functional, it does many things.
One specific thing it does is to operate the mechanisms involved in glucose disposition, thus the more carbs you eat and therefore the more glucose, the more insulin you need to utilise it.
Protein is also partly converted to glucose which is why it may be necessary to account for protein intake in your boluses.
Insulin resistance is not necessarily related to this, but obviously if you suffer from it then you will need much higher insulin ratios, and these may vary considerably more over the course of a day