With a simple example, you realize the difference between Function (FC) and Function Block (FB). The FC works without memory while the FB stores data in its own Data Block (DB) and retains data.
So use a function (FC) when you need to perform a specific task without requiring the retention of data or state between executions.