Modified() is a C++ method of vtkObject, and it applies to the C++ vtkAlgorithm in the same way as it does to vtkPythonAlgorithm. The only difference is that most of the C++ Set methods are implemented with vtkSetMacro, and this macro automatically calls Modified() when it sets the parameter.
As for the purpose of Modified(), it’s fundamental to the operation of the VTK pipeline. Modified() sets the algorithm’s timestamp, so that the pipeline knows that the algorithm has to be re-executed the next time the pipeline is updated.