At the time of the trade it wasn't such a bad deal. Ryan had an impressive fastball early in his career, but he was all over the place, walked a lot of batters, and had a high ERA. He didn't become a dominant pitcher until after he got to California, and he really didn't master his control until he was in his mid-30s.
Ryan might have had one of the oddest statistical seasons for a pitcher in 1987. He pitched for a Houston Astros team that gave him almost no run support, going just 8-16 even though he led the National League with a 2.76 ERA and 270 strikeouts!