Relapse means to fall back into illness after recovering (convalescence is the recovery process). Recidivism means relapsing into criminal behavior after rehabilitation (which is the reform/recovery process). The analogy is about falling back after a recovery or reform process.