For a function returning void, this does not matter, since the "fall from the end" of the void function simply returns as you expected.
However, some people like to do this to help with future maintenance. For example, if someone later decides to change the return type of the function to say int, you should get a compiler error if you forget to change this final return statement to return an int value. If you didn’t have a return statement at all, the return value is undefined, and many old compilers did not warn you about this (it's true - I saw it!). This is not a problem these days, as most modern compilers will warn about this.
source share