AFAIK, planes flying at up to FL180 (18,000 ft pressure altitude) are allowed to fly at both round and semi-round altitudes (e.g. 15,000 ft or 15,500 ft). Planes flying above FL180 must fly at a round altitude (e.g. 28,000 or 29,000 ft but nothing in between). Why aren't planes allowed to cruise at semi-round flight levels above 18000 ft of altitude?
In general, the minimum vertical distance two IFR aircraft can be (if they are not separated laterally) is 1,000 feet. This allows for inaccuracies, for example due to:
- altimeter error
- instrumentation imprecision
- pilot imprecision
- aircraft height (compare a Skyhawk, nine feet tall, with an A380, 79 feet tall)
while still making sure aircraft do not physically occupy the same 4D location.
In order to make things easier, especially in the non-radar control environment but also in the radar control environment, IFR aircraft cruise at distances that are 1000' apart (depending on their direction of flight). If, say, there was one flight at 4200' and another at 4600' and they were going to get close, the controller would have to issue a change in altitude to one or both planes, and then allow them to go back to their original altitudes. If they are instead at 4000' and 5000' then nothing needs to be done.
It is theoretically possible that the rule could be "All aircraft must cruise at xx,835 feet"—e.g. an eastbound plane at 15,835' and a westbound plane at 16,835' would be properly separated. But due to general inaccuracies and imprecision, as well as the way humans perceive numbers, it is much easier for the cruising altitudes to be "round." ATC only sees altitudes in hundreds-of-feet increments, and "steam gauge" dials may include ten thousand feet of readout in a dial only a couple inches in diameter. Using round thousands of feet is generally easier.
Then there are VFR aircraft. In most airspace there is no defined minimum separation between two VFR aircraft, nor even between a VFR aircraft and an IFR one. But it would still be very very bad for the two to occupy the same 4D location. So the rule is that VFR aircraft cruise "in between" at the half-altitudes, the x,500' altitudes.
Once in Class A airspace (in the US, FL180 to FL600) VFR is not allowed, with certain very limited exceptions, so there should be no aircraft cruising at FLxx5. It is still true that an aircraft at FL205 and one at FL215 are separated, but to make things easy and consistent the cruise altitudes are still round thousands. (Once you get even higher it is more difficult to maintain a steady altitude, I believe due to the reduced air density, and eventually the minimum separation increases to 2000'.)
To put it all another way: In the absence of any other traffic an aircraft can fly at whatever altitude the pilot likes. But when there may be traffic conflicts, it is prudent to ensure aircraft are separated by default, and that means using prescribed altitudes.
This answer is specifically for the US--
Above 3000' AGL and below 18000' MSL (which is not the same thing as FL 180)1, cruising VFR traffic flies at MSL altitudes which are "round" numbers plus 500' (e.g. 3500' MSL, 4500' MSL, 5500' MSL, etc) while cruising IFR traffic flies at MSL altitudes which are "round" numbers (e.g. 4000' MSL, 5000' MSL, 6000' MSL, etc).
There's also a rule stating that when flying on magnetic courses (i.e. the intended magnetic ground track) from 000 to 179, VFR traffic will use "odd" thousands (e.g. 3500' MSL, 5500' MSL), and will use the "even" thousands (e.g. 4500' MSL, 6500' MSL) for courses from 180 to 359. See this source. The same "odd/even" separation based on course applies to IFR traffic too, at least below 18000' -- odd for 000 through 179 (e.g. 5000' MSL, 7000' MSL) and even for 180 through 359 (e.g. 4000' MSL, 6000' MSL) -- see this source.
So in the US, if you are just bouncing around VFR and maneuvering, not really cruising at any constant altitude, you'd be wise to avoid (or at least be extra vigilant around) the "round" thousands, because that's where the IFR traffic will be concentrated.
The exact wording from FAR 91.159 specifying when VFR traffic should follow these prescribed cruising altitudes is "in level cruising flight more than 3,000 feet above the surface"... "except while holding in a holding pattern of 2 minutes or less, or while turning". This language would not apply to extended "cruise" climbs or "cruise" descents, as well as all sorts of maneuvering flight beyond simple "turning" (e.g. practicing stalls -- or full-blown aerobatics). Consider also that it's actually more efficient for a pilot to let his or her plane drift up and down a bit when passing through updrafts and downdrafts, rather than pulling the stick or yoke back to hold altitude in downdrafts, and putting the stick or yoke forward to hold altitude in updrafts-- the exact opposite of the strategy that a glider pilot would choose to maximize cross-country speed over an extended course. This sort of variation in altitude would appear to take a plane outside of the realm of "level cruising flight". Still, it would be wise to avoid the "round" thousands while flying in this manner, since that's where the IFR traffic will be cruising.
At the end of the day, a pilot must remember that there's a myriad of reasons an aircraft may be flying at an altitude other than the one prescribed by FAR 91.159 for extended level cruising flight. And some of that traffic may lack a transponder. "See and avoid" always!
In the US, VFR traffic essentially never is allowed to cruise at or above 18,000' MSL, but IFR traffic operating at or above 18,000' MSL will operate in reference to "Flight Levels" rather than actual MSL altitudes. "Round" numbers will be used (e.g. FL 190, FL 200, FL 210.) The east-west rule will apply here too -- airplanes flying with magnetic courses between 0 and 179 degrees will be assigned "odd" Flight Levels (e.g. FL 190, FL 210), while airplanes flying with magnetic courses between 180 and 359 degrees will be assigned "even" Flight Levels (e.g. FL 200, FL 220).
- Flight Levels are determined by setting the altimeter's pressure setting (Kollsman window) to the International Standard Atmosphere pressure of 1013.25 hPa (29.92 inHg), while actual MSL altitudes are determined (or at least closely approximated sufficient to satisfy regulatory requirements) by using the pressure setting of a nearby airport. Generally speaking, the actual height above ground of any given "Flight Level" shows much more variation, with changes in atmospheric pressure, than the MSL altitude reading obtained with the altimeter set for the pressure setting of a nearby airport, which should be a close approximation of the aircraft's actual altitude above sea level. In the US, "Flight Levels" rather than actual MSL altitudes are only used at or above 18,000' MSL. In contrast, in Europe, Flight Levels are used well below 18,000' MSL.