If the cyclist moved over to avoid the puddle during your pass, he may not have known you were there. If this were the case, either he was oblivious or impaired. Did he have a mirror to gauge traffic coming from behind? Did he do a shoulder check before moving over? Was he listening to music so loud that noise of other vehicles was suppressed?
One can hope that he reflects on the incident (as you are doing) and considers how his actions could have been different. Close calls are an incredible motivation to learn.