In doing so:
Bob walked his dog. In doing so, he exercised.
The first phrase in doing so gives the impression that effect of his first action (walking the dog) wasn't at all intended to cause the second. He exercised, but this occurred only as a side benefit.
I agree with the explanation. "In doing so" is used when the action done is not the primary purpose. The primary purpose was walking the dog. The exercise was a side benefit.
In this way:
Kathy finished watering her plants and set down the hose. In this way, the hose would be close by for next time.
In this example, the phrase in this way is used. It is implied that Kathy desired the results described in the second sentence. She wants the hose close by. However, it isn't a very strong desire. If her husband comes and stores the hose, she will just get it out again.
So that:
Fred went to Law school so that he could get a degree.
In this example, Fred performed the first action (law school) expressly for the purpose of achieving the second action (get a degree). This was his entire goal.
I'll change out the last example with a different phrase for clarity:
Fred went to Law school. In doing so, he could get a degree.
If you said this, a listener might be confused. They might ask "Did he want the degree?" or "Did he have another reason for going?" Maybe Fred's main purpose was to party with college students and blow off classes.