He knew but he made no attempt to stop them. Supernatural powers
can never overcome karmic forces. For this, you have to read
Mogallana's story. Mogallana is one of Buddha's top 10 disciples,
he is an enlightened arhat and among Buddha's disciples he is the
foremost in the area of supernatural powers.
http://www.buddhanet.net/e-learning/history/db_02.htm
quote:
Mogallana always thought that nothing was impossible with
his supernatural power. However, little did he realise that
supernatural power could not help one escape the law of cause and
effect. Neither did he know that it could not defeat karma and free
one from the cycle of life and death.
Once, the Buddha's homeland Kapilavastu was invaded by King
Vidudabha of Kosala. Being a patriot, the Buddha had succeeded in
blocking the enemy for three times. But King Vidudabha did not want
to give up. Knowing that this was due to the karma of Sakya clan.
The Buddha had no choice but to let it be.
Mogallana was deeply agitated when heard that Kapilavastu was
surrounded by enemy troops. Though the Buddha told him this was the
karma of Sakya clan, he insisted on saving the clan people with his
miraculous power.
He flew into Kapilavastu which was already encircled by enemy
troops ring upon ring. He selected the five hundred outstanding
Sakyas and put them in a bowl. When he had safely flown out of the
country, he opened the bowl and found that the five hundred people
in it had already turned into a flood of blood!
Mogallana then realised one could not violate the law of cause and
effect taught by the Buddha. Even supernatural power could not
outmatch karmic effect.
----------
Now, come back to the question of Devadatta. The Buddha, being
omniscient, knew of Devadatta's intentions for entering the Sangha.
So why did Buddha allow Devadatta into his Sangha?
The reason is because even though he KNEW that when Devadatta
enters the sangha he is intending to commit deeds that would earn
him huge unwholesome karma -- one being to cause a schism in the
sangha, and the other being to hurt the Buddha.
(Note: Devadatta intended to Kill the Buddha, but a Buddha cannot
be murdered, so he only managed to hurt/injure him. Hurting a
Buddha and causing a schism in the Sangha are two of the 5 heinous
'sins'/bad karma that will result in birth in the lowest hell,
Avici hell)
And Buddha also knew that as a result of such acts, Devadatta will
create the karmic causes of rebirth in Hell. So why would Buddha
allow such things? This is because the Buddha knew that by allowing
Devadatta to enter the Sangha, he would develope meditative
qualities and jhanas and thereby create the causes to attain the
fruits of Pratyekabuddhahood some kalpas away.
If the Buddha did not allow Devadatta to enter the Sangha, he would
still commit great karma but cannot create the conditions for
enlightenment in the future.
As for the reason why Devadatta was against the Buddha, there were
some karmic causes in the past lives, you may wish to find
out.
BTW, chanting sincerely (repentance is also very useful and
recommendable) can help lighten some bad karmas in some occasions.
But it does not mean all karma can be averted. Like I said
previously, for beings like Buddha his karma has lessened much more
such as the case of Angulimala also, but nevertheless some karma
will still manifest/ripen into effect.
If chanting averts all bad things from happening, then if anyone
who chant should be living a perfect life with no problems at all.
Unfortunately this will not happen to anyone. This does not mean
chanting, repentance, and all the practices aimed at purifying
karma does not work though.
For Angulimala case (see http://www.buddhanet.net/e-learning/buddhism/disciples10.htm)
having killed 999 people he later met the Buddha who converted him
and taught him the Dharma, and which he later attained
Arhatship.
Usually murderers have created very very heavy karma and is heading
to the hell realm, but for the case of Angulimala because he
followed the Buddha's instructions and attained enlightenment and
liberation, Nirvana, he was able to overcome much of this
karma.
This does not mean he does not experience any karmic effects from
his unwholesome deeds at all -- some karmic fruition still
surface.
http://en.wikipedia.org/wiki/Angulimala
...However a resentful few could
not forget that he was responsible for the deaths of their loved
ones. Unable to win revenge through the law, they took matters into
their own hands. With sticks and stones, they attacked him as he
walked for alms.
With a bleeding head, torn outer robe and a broken alms bowl,
Angulimala managed to return to the monastery. The Buddha
encouraged Angulimala to bear his torment with equanimity; he
indicated that Angulimala was experiencing the fruits of the karma
that would otherwise have condemned him to hell. This illustrates
the Buddhist belief that while the effects of karma are
inescapable, the form that they take and the schedule on which they
occur can be modified by later actions -- in this case, Angulimala
experienced physical suffering during the course of his last life,
rather than experiencing torment in another birth for a much longer
period of time.
Being an arahant, Angulimala remained firm and invulnerable in mind
and heart. But his body, the symbol and fruit of previous kamma was
still exposed to the effects of his former evil deeds. As an
arahant, he needed no words of consolation, but a reminder of the
kammic concatenation of cause and effect, which still has to be
endured until the end.
When he entered Sāvatthi for alms, he was attacked by the mob, but
on the admonition of the Buddha, endured their wrath as penance for
his former misdeeds.
According to the Dhammapadatthakatha (iii.169) he appears to have
died soon after he joined the Order...