幸亏 is composed of the characters 幸, meaning "luck" or "fortune", and 亏, meaning "deficit" or "shortfall". Their combination forms the word meaning "fortunately" by conveying the idea that luck offsets a potential deficiency or adverse outcome.
Flag incorrect definitions, examples, etymology, etc.