while(1)
{
PORTB = PINA;
}
Every IO port has three registers associated with it.
DDRx == If a bit is set 1 that pin is an OUTPUT, if it is set 0, it is an INPUT.
PORTx == What the data port is set to; On an OUTPUT this will set it's drive state, on an INPUT it will read/set the internal pull-up enable/disable feature of that I/O line.
PINx == The actual current logic state of that port as ready directly from the I/O port comparator latch. Please note the PINx and PORTx can be different on an output port. If the PORT register is set to 1 on an output pin, and the corresponding PINx bit is 0 then that means the external circuit on that pin is holding that I/O line LOW. If the PORT register is set to 0 on an output pin and the corresponding PINx bit is 1, then that means the external circuit is forcing that I/O line HIGH. Mind you both of these states usually mean a fault of some kind, but can be very useful if the external circuitry is well defined. It can be used to determine if the I/O line effectively dead shorted, or it it's being driven by a harmfully high external voltage. Switching an output to an input during these two states can save the micro controller in fault conditions from being friend.
What your code is doing is reading the PORTA register of an input, which will remain whatever it was at power on (or it's default state I'm not sure what it is) unless you change it, it has nothing to do with the what is being applied to that I/O port externally. It's a very common mistake.