Question regarding 16 QAM digital modulation
First of all, I recommend getting familiar with Matlab's doc command. doc qammod has the answers to your second question: qammod requires a vector of integers between 0 and M-1.

Regarding your first question: the reason to reshape your bits into groups of four is that 16-QAM transmits $\log_2(16)=4$ bits per symbol. So, your bi2de command requires binary numbers of four bits to get decimal integers betwen 0 and 15.

If you want to save lines of code, what you could do is generate integers between 0 and 15 directly, with dataSymbolsIn = randi([0 15], n/4, 1). However, doing this has one disadvantage: calculating the bit error rate at the receiver is more complicated if all you have are the integers. Let's say that you transmit a 15 and receive a 13 (obtained with qamdemod), how many bit errors there were? This is why it's common practice to start with actual bits in the transmitter and compare them one-to-one with the received bits.