The first couple YC batches were small enough that the money invested was probably a very small portion of what PG/Robert/Trevor earned from Viaweb.
For later batches, it had become evident that YC's model was promising, and YC also raised money from outside LP's.