Hello,
main() is a function the execution MUST always stay into.
An embedded program should not stop like a desktop application.
In your software, the execution starts and toggle the port. Then, the MCU does not know what to execute and RESETS.
When RESET occurs, PORTAA is an input until the execution arrives at DDRAA=0xFF execution.
At the end of the execution, within the main(), add a while(1) if you want to stop execution.
Cheers,
Alban.