The purpose of functions and subroutines is to save time and space by just calling a function/subroutine.
Subroutines do not return any values, while functions return values. Subroutines are also allowed to change the values of the parameters while functions are supposed to maintain them.
References
https://en.wikibooks.org/wiki/BASIC_Programming/Subroutines_and_Functions