When would you not want to use discreteLock on foreach?
... in cases where you want to ensure that the collection you are iterating is not changed by other processes.
You may be wanting to add up a total or count a number of objects, without concurrent processes adding or deleting objects during the iteration. It depends on your requirements.
I remember someone asking the related question "why does
foreach always lock the collection for the entire iteration?" in a Jade training course many years back (version 5). The answer from the Jade trainer was to the effect of: "why wouldn't you want it that way?" and advocated the requirement for an invariant collection.
Obviously there are various cases, so use what's best in each case.