How can we prove that Greedy approach for activity selection problem will always be correct.

I read an article on wikipedia( https://en.wikipedia.org/wiki/Activity_selection_problem )

and there was a proof of optimality (i.e. it will always give the maximum no. of tasks that can be done by a person) on it but i didn’t get it.

Can someone help me out?