The ironic part of the film is that if it weren’t for Miller’s mission, Ryan’s ad hoc squad may not have been able to successfully hold the bridge.
On the other hand, releasing Steamboat Willie instead of executing him (which many of Miller’s squad members wanted to do) did make things rather more difficult.
That’s a good point. Was it ever said in the movie that Ryan was being discharged? Maybe he was just being reassigned to a safer military assignment back in England or America. He still would have been a soldier contributing to the war effort but he would be much more likely to survive the war.