Good question. The gray button with red "R" is a situation when you have an audio track selected, and no other audio tracks are armed for recording. When you click the record button, it automatically becomes armed for recording.
The entire "R" button turns red when you specifically arm a particular track (or tracks) for recording. However, this track (or tracks) could be different from the currently selected track, which would still have gray button with red "R" in this scenario, but won't have any audio recorded on it when you click "Record".
So, in a nutshell, by default the audio will record on a currently selected track (gray button with red "R") if Logic is not specifically instructed to record on other tracks (i.e. record-armed tracks with solid red "R" buttons).