Raw milk generally has enough extra lactic acid bacteria to outcompete other bacteria and cause souring rather than spoiling. Pasteurizing kills most of all the bacteria and any could win the competition, including harmful ones.
The way to get around it is to add a lactic acid bacteria starter culture, available from cheesemaking supply places. It's not cheap, especially if you have to add shipping. The other way is as the Wikipedia article above says, add buttermilk that has live active cultures. I've not tried the buttermilk way, but have used mesophilic cheesemaking culture and it works well, souring faster or slower the more or less you add.
If you want to go all the way... I tried this to duplicate period milk for reenactments and it did the job: inoculate fat-free milk with a starter and pour in a small carton of cream. It can be kept at cool room temperature (or warm but it won't last as long). The cream will rise and the milk will slowly sour, so the cream can be skimmed off for use, the milk drunk sweet, then used for baking after it sours in a couple days.