don't know about petunias, moggle but "yes definitely" to sweet peas.
When it has set seed, which is its ultimate aim, it signals the end of the plants life. Removng the ripening seeds 'tricks' it into trying to produce more, hence more flowers!
You can leave a few pods on to ripen at the end of the season if you save your own seed for next year, as I do. :)