Two variants of signing transaction When signing transaction I think the following is done (in short):

For each input


all inputs and outputs are taken
the respective input scriptSig is filled with txPrev.pubScript, other inputs's scriptSigs are left blank?
this is signed and signature is put in scriptSig


Is there any benefit for bundling all inputs prior to making each signature? Could just respective input be used when signing for that input?
Answer provided by @Andrew Chow:


  The benefit is that each signature commits to the inputs and outputs
  of the transaction so that they cannot be changed. If each input only
  commit to one input, then more inputs could be added and malleate the
  transaction. However, there is a sighash type that allows this: sighash
  ANYONECANPAY.