Usually strength isn't the main objective of sparring, but yeah it could improve doing it.

Although I wonder, maybe it's not as much that you built strength but that you got more comfortable using it? Against lighter opponents, nice people tend to hold back a bit, but when you fight bigger guys, when you notice your punches don't phase them you instinctively begin to hit harder and use more of your strength.

If you got in the habit of doing that and then went back to fighting lighter opponents maybe that's why?