Yes, those actions are required by mac owners to open the permissions for any applications that are not part of Apple's Developer list. The very last sudo statement permanently opens those permissions. The chmod is required sometimes if the port from a pc origin doesn't apply the proper execution flag on the app itself (which sometimes doesn't happen).