Why do we use bitwise operators to assign PORTx, DDRx and Pinx?
My question is why do we need to use bitwise operations to make assignements?

Because you're not assigning, you're modifying.
If you want to turn on just pin 3 (for example) you need to only control bit 3 of PORTB and leave the others alone.
That means you need to &quot;or&quot; the value of just bit 3 being on with the existing PORTB to turn the bit on, or AND it with the inverse (all pins on except bit 3) to turn it off.
To get the value of bit 3 you can remember that it's 4, or you can just use 1&lt;&lt;3 to say &quot;Bit 3&quot; - or use the macro PORTB3 to make it more readable instead of just the number 3.
The operation is commonly known as &quot;Read Modify Write&quot; and in some low-end microcontrollers you have to take special care when doing it.
For example, if you want to control the output pin 3 and currently you have pins 2, 5 and 6 on and the rest of pins 0-7 off (those are the ones on port B on the Uno) the sequence may be like:
Turn on:

Calculate bit value 1&lt;&lt;3    =&gt; 0b00001000
Read PORTB                  =&gt; 0b01100100
OR the two values together  =&gt; 0b01101100
Write to PORTB              &lt;= 0b01101100

Turn off:

Calculate bit value 1&lt;&lt;3    =&gt; 0b00001000
Invert it                   =&gt; 0b11110111
Read PORTB                  =&gt; 0b01101100
AND the two values together =&gt; 0b01100100
Write to PORTB              &lt;= 0b01100100