Why is only intentional action considered as Karma, which gives rise to corresponding consequences? Consider a situation (just a silly example) like this:

Suppose I'm walking on a road or grass field, and I know there are living beings like ants and other insects lying down on the surface, but I don't have any intention to kill any being while I walk there to reach my destination.

But, as I'm walking, consequently, many little beings are killed by me by stomping on them, though I don't have intention to do so.

Buddhism says that only an action done with intention will account as a Karma that will affect us accordingly..

Referring to this and the situation I gave for example, does it mean that the killing of insects without intention (though I know I'm going to kill them) isn't a bad Karma?

Will I not face any effect due to that action I did unintentionally, but KNOWINGLY?

If that's the case, why can't I rob a house and say that I just did it to quench my starving stomach, not to hurt anyone?

Isn't the consequence of doing an unintentional action considered as a seed that can affect oneself? Why?

If you say I'm wrong, then how is Karma in Buddhism different from that of Jainism, where every action is a Karma?
What you say or justify do not count. What counts is your volition.

For volition to give result the volition should have any of the 6 roots (3 wholesome - alob, adosa &amp; amoha + 3 un wholesome - lob, dosa &amp; moha ). When you accidentally step on an insect you do not know of its existance non of these roots arise in your mind, as you do not have any intention to kill. You know you are steeping on insects but as iterated before you do not have the intention to step on them, hence there is no un wholesome roots in your mind to create the Karma.

When you do rob someone what ever the justification you are motivated by one of the roots (loba). Even satisfying your hunger is due to loba. What ever the justification there you know and have the intention. Hence there are Karmic results. Every wilful action need intention, even an action which might not generate any karma like lifting your hand. Your body will not sleep walk you into robbing without any intention or thoughts.

Also I asked this related question which might complement the above question: Where in the Tripitaka completion of the formation of Karmic result is mentioned?