[optix7 RT]Removing the hitgroup in the pipeline and continuing work confuses me, unlike DXR and Vulkan

Change line 336 in optixTriangle.cpp from OptixProgramGroup program_groups[] = { raygen_prog_group, miss_prog_group, hitgroup_prog_group }; to OptixProgramGroup program_groups[] = { raygen_prog_group, miss_prog_group, /*hitgroup_prog_group*/ };, in the optixTriangle example.
But it sitll works, why?