You should use do_action and/or apply_filters functions while you’re writing WordPress plugins.
If you do this someone else can write plugins to your plugins, can do modifications without touch to your plugin’s core code. So users can do plugin upgrades automatically.