They typically hire two different companies to do the translations, and the translations are optimized for different goals. Subtitles are just meant to be easy to read. With dubs they try to make what's being said at least vaguely line up with what the actors' lips are doing in an effort to avoid the infamous "1970s kung fu movie" effect.