Its mentioned in Goodfellas so this is obviously a thing among Italian families and their cooking.
Do you stir to prevent it from sticking? Why cook the sauce for so long?
To cook a sauce for a long time, particularly without a lid, concentrates the flavor of the sauce as the water evaporates. That's also called reduction. Yes, sauces that are cooked that way need to be stirred frequently to avoid allowing them to stick to the bottom of the pan. Sticking is bad enough, but it leads to burning, which is worse.
In meat sauces (sauces that include meat), long cooking can also contribute to tenderness of the meat and allow the meat flavor to permeate the sauce as the long cooking breaks down the collagen in the meat.
Not all Italian sauces are cooked for a long period of time; not even all tomato based sauces are cooked for a long time.
There are several classes of sauce that benefit from long cooking times:
The main purpose of the stirring is to help even out the cooking, and prevent the sauce on the bottom from overcooking or burning while the rest is undone. Many cooks, myself included, prefer to put the whole pot in the oven when making a braise which does not require reduction, as the gentler surrounding heat is not likely to burn the dish, and so stirring is not required.