the reason why there are multiple inputs and outputs in transactions are because the don't behave like 'normal-paper-and-coin'-money.
the way bitcoin operates is that you can spend a whole output or not, but not a fraction of it. so if i where to send you some bitcoin(5btc) but i have 2 outputs of 3btc i can spend both outputs(as inputs) and create 2 new outputs, one to you(5btc), and one back to myself(1btc).
like:
Tx:
input 1: reference to previous output - 3btc
input 2: reference to previous output - 3btc
output 1: new output - 5 btc
output 2: new output - 1 btc
its explained in satoshi's paper:
http://bitcoin.org/bitcoin.pdf