If my understanding of the question is correct, the OP is asking why exactly the CSM/LM stack longitudinal axis (from nozzle bell to pointy front end) was oriented perpendicular to ecliptic plane during Passive Thermal Control (PTC) mode, when it would've been also possible to orient it within the ecliptic plane thus maintaining the line of sight with Earth in order to have continuous communication.
I do not understand the difference in heat distribution between perpendicular or parallel orientation
Whilst rotating along the longitudinal axis, in order to have a uniform heat distribution, the axis orientation in space has to be such that sunrays are always perpendicular to the axis.
The Apollo CSM/LM spacecrafts were indeed oriented perpendicular to the ecliptic during PTC.
Apollo-15 Flight Journal day1/4:
... the longitudinal axis of the spacecraft is brought perpendicular to the ecliptic which guarantees that the Sun (which is always in the plane of the ecliptic) will strike the spacecraft side on as it rotates.
The reason for this is already given in @RussellBorogove's answer:
In this attitude, Earth and the Moon would alternate being visible through either the CM or LM windows.
When considering outbound journey, If the spacecraft was oriented within ecliptic plane, the only way to get sunrays perpendicular to its longitudinal axis would have been to point it approximately across Earth-Moon line. In this case the astonauts would not be able to see neither the Earth nor the Moon (one would be underneath the "floor", i.e. behind the Service Module, the other would be obscured by the LM), so all they could have observed would have been the Sun and the darkness of space.
Image borrowed from Apollo-15 Flight Journal day1/4
For inbound journey (depending on the mission length) it is arguable if it was even possible to maintain line of sight with the Earth and have sunrays perpendicular to the longitudinal axis whilst having the longitudinal axis within the ecliptic plane.
- Communication.
When perpendicular, didn't this make communications more difficult with line of site continually rotating?
Yes, a little bit.
The CSM had several types of antennas for communication with Earth:
Sketch is borrowed from Apollo-10 Flight Journal day1/4.
During PTC, signal between two of the four omnidirectional antennas, located circumferentially with 90 degrees spacing, was periodically alternated for communication with Earth.
Apollo-11 Flight Journal, day 2/2:
When the spacecraft is in a relatively stable attitude, communications are usually via the High Gain Antenna as long as Earth is within the range of its articulation. This dish antenna can automatically track a ground station by sensing when it is going slightly off track. If the spacecraft is rolling in its Passive Thermal Control mode, a set of four omnidirectional antennae mounted at 90° intervals around the periphery of the CM are brought into play. Normally only two of these antennae are used; B and D on opposite sides of the spacecraft, but these have to be switched every 10 minutes as the spacecraft rotates.
Apollo-15 Flight Journal day1/4:
Two notable items in the presleep comm configuration are the selection of the omni-directional antenna and the pointing of the HGA. By selecting Omni B, the crew are allowing Mission Control to switch between that antenna and antenna D. Nearly constant coverage is maintained during the PTC roll as these antennae are on opposite sides of the CM.]
So, to answer the second part of the question, yes, there was a difficulty: twice per full revolution (i.e. every 10 minutes) the omni antennas had to be switched over. This could be done either by the crew, or remotely from the Mission Control when the crew was sleeping.
Apollo-15 Flight Journal also describes a partial (non-continuous) use of the High Gain Antenna (the four dishes at the "bottom" of the SM) during PTC:
The High Gain Antenna is also brought online for the rest period. Despite the spacecraft's rotation, it must be operated in a mode whereby it keeps contact with Earth as much as possible without intervention from the crew. This is achieved by operating it in the "Reacquire" mode where the antenna will track Earth regardless of changes in the spacecraft's attitude. However, when it reaches the limits of its articulation, it will position itself to the angles set on dials in the cabin, awaiting a moment when Earth reappears in its line of sight. As the attitude and movement of the spacecraft is well defined during PTC, a pair of angles are given in the CSM Systems Checklist which have been pre-calculated to bring Earth into its line of sight each time the rotation of the spacecraft brings the HGA around. Angles are given to cover left and right roll.
Emphasis in all quotes mine.