I dont know what Fastlane is and it is not required for the pipeline to work.
The publish task is needed so that build results are not deleted after the run. You can download them afterwards. In this case you get an ipa file for iOS and an app bundle file for Android.