Teams do NOT have to keep Rule 5 picks on their roster all year. They do have other options for holding on to them
If a team selected Groome, they could try to work out a trade or cash settlement with the Red Sox, for example. Or they could trade him to another team, who would assume Groome's Rule 5 status and have the same options of keeping him, trading for him, or working out a cash deal.
These types of deals happen all the time...