a pleasant situation or event that is not planned or intended.
We never planned to have a third child - it was a happy accident.
happy accident
A mistake or unplanned event that results in a beneficial outcome or pleasant surprise. The creation of penicillin was a happy accident that resulted from Alexander Fleming's discovery of mold growing in his agar plates.