In Chamber of Secrets we find the following description of the Burrow's floors:
They slipped out of the kitchen and down a narrow passageway to an
uneven staircase, which wound its way, zigzagging up through the
house. On the third landing, a door stood ajar. Harry just caught
sight of a pair of bright brown eyes staring at him before it closed
with a snap. “Ginny,” said Ron. “You don’t know how weird it is for
her to be this shy. She never shuts up normally — ” They climbed two
more flights until they reached a door with peeling paint and a small
plaque on it, saying RONALD’S ROOM.
This indicates that Ron's room is on the fifth floor above the ground floor. We know that Ron's room is on the top floor because it is directly beneath the attic:
“It’s a bit small,” said Ron quickly. “Not like that room you had
with the Muggles. And I’m right underneath the ghoul in the attic;
he’s always banging on the pipes and groaning. ...”
Thus, there are precisely five floors between the ground floor and the attic. The question here, then, is why there are only five bedrooms in five floors. This assumes that each floor is a full floor that has multiple rooms. However, the description of the house structure that we get in Chamber of Secrets is:
It looked as though it had once been a large stone pigpen, but extra
rooms had been added here and there until it was several stories high
and so crooked it looked as though it were held up by magic (which,
Harry reminded himself, it probably was).
This indicates that there are not necessarily full floors. Rather, rooms were added on individually and eventually the house ended up with all those floors.
That being the case, it is possible that each floor is actually only the one room that was added. If so then it makes perfect sense why there would be five bedrooms across five floors – the five floors are the five bedrooms.
This is also supported by the fact that when they walk up the stairs they don't see anything else besides the landings and the bedrooms off the landings.
Now all that remains is to see whether such an arrangement can be consistent with descriptions of the sleeping arrangements throughout the series. As far as I am aware, there are five instances where (some of) the sleeping arrangements are described. This may get a little tricky, especially if we consider that the arrangements might have changed over the years or that JK Rowling might have accidentally introduced minor inconsistencies. Here goes:
Chamber of Secrets (summer)
We don't have very much information this time around. What we are told is that Ginny was on the third landing, Ron was two flights above her, and the ghoul was in the attic:
They slipped out of the kitchen and down a narrow passageway to an uneven staircase, which wound its way, zigzagging up through the house. On the third landing, a door stood ajar. Harry just caught sight of a pair of bright brown eyes staring at him before it closed with a snap.
"Ginny," said Ron. "You don't know how weird it is for her to be this shy. She never shuts up normally —"
They climbed two more flights until they reached a door with peeling paint and a small plaque on it, saying RONALD'S ROOM.
"Yeah, Mum's always wishing we had a house-elf to do the ironing," said George. "But all we've got is a lousy old ghoul in the attic and gnomes all over the garden. House-elves come with big old manors and castles and places like that; you wouldn't catch one in our house...."
Goblet of Fire (summer)
Once again we are somewhat limited in information. We are told that Percy's room was on the second landing, that Ron's room was three flights above Percy and at the top of the house, that Bill and Charlie were staying in Fred and George's room, and that Fred and George were staying with Harry and Ron in Ron's room:
Just then a door on the second landing opened, and a face poked out wearing horn-rimmed glasses and a very annoyed expression.
"Hi, Percy," said Harry.
"Yeah, yeah, all right," said Ron, and he started off upstairs again. Percy slammed his bedroom door shut. As Harry, Hermione, and Ginny followed Ron up three more flights of stairs, shouts from the kitchen below echoed up to them. It sounded as though Mr. Weasley had told Mrs. Weasley about the toffees. The room at the top of the house where Ron slept looked much as it had the last time that Harry had come to stay:
"Shut up, Pig," said Ron, edging his way between two of the four beds that had been squeezed into the room. "Fred and George are in here with us, because Bill and Charlie are in their room," he told Harry. "Percy gets to keep his room all to himself because he's got to work."
Half-Blood Prince (summer)
Here the only information we are given is that Harry slept in Fred and George's room which was on the second floor:
"Bed," said an undeceived Mrs. Weasley at once. "I've got Fred and George's room all ready for you, you'll have it to yourself."
Fred and George's bedroom was on the second floor.
Half-Blood Prince (Christmas)
Here we are given a few facts about the arrangements, but not much about the locations. We are told that because Remus was coming Bill would have to share a room with Fred and George (seemingly implying that prior to Remus's arrival Bill was occupying the room that Remus would take), and we are told that Ron and Harry would be in the attic and that Percy wouldn't be coming:
"Fred, George, I'm sorry, dears, but Remus is arriving tonight, so Bill will have to squeeze in with you two."
"No problem," said George.
"Then, as Charlie isn't coming home, that just leaves Harry and Ron in the attic, and if Fleur shares with Ginny —"
"— that'll make Ginny's Christmas —" muttered Fred.
"— everyone should be comfortable. Well, they'll have a bed, anyway," said Mrs. Weasley, sounding slightly harassed.
"Percy definitely not showing his ugly face, then?" asked Fred.
Mrs. Weasley turned away before she answered. "No, he's busy, I expect, at the Ministry."
Deathly Hallows (summer)
Here we get a lot of information about the arrangements, but again very little about the locations. We are told that Mr. and Mrs. Weasley slept in the Sitting Room, Fleur's parents slept in Mr. and Mrs. Weasley's room, Fleur and Gabrielle slept in Percy's old room, Bill and Charlie shared a room, Harry and Ron slept in Ron's room, the ghoul was in the attic, and Ginny's room was on the first floor landing:
On the downside, the Burrow was not built to accommodate so many people. Mr. and Mrs. Weasley were now sleeping in the sitting room, having shouted down Monsieur and Madame Delacour’s protests and insisted they take their bedroom. Gabrielle was sleeping with Fleur in Percy’s old room, and Bill would be sharing with Charlie, his best man, once Charlie arrived from Romania.
“Yes, good point,” said Mrs. Weasley from the top of the table where she sat, spectacles perched on the end of her nose, scanning an immense list of jobs that she had scribbled on a very long piece of parchment. “Now, Ron, have you cleaned out your room yet?”
“Why?” exclaimed Ron, slamming his spoon down and glaring at his mother. “Why does my room have to be cleaned out? Harry and I are fine with it the way it is!”
“That’s your ghoul, isn’t it?” asked Harry, who had never actually met the creature that sometimes disrupted the nightly silence.
“Yeah, it is,” said Ron, climbing the ladder. “Come and have a look at him.” Harry followed Ron up the few short steps into the tiny attic space.
Ron's splutter was interrupted by the opening of a door on the first-floor landing. "Harry, will you come in here a moment?"
It was Ginny. Ron came to an abrupt halt, but Hermione took him by the elbow and tugged him on up the stairs. Feeling nervous, Harry followed Ginny into her room.
We are not told anything about Fred and George, and presumably Hermione was with Ginny.
In the above five instances there a couple of potential inconsistencies. First, in the Half-Blood Prince Christmas instance Harry and Ron are said to be sleeping in the attic, yet the attic is supposed to be the ghoul's room. This can be simply resolved by noting that on several other occasions Ron's bedroom is said to be an attic bedroom:
"What's up, Harry?" said Ron, the moment they had closed the door of the attic room behind them.
Harry and Ron climbed all the way up to Ron's attic bedroom, where a camp bed had been added for Harry.
When they returned to the house, Mrs. Weasley was nowhere to be seen, so Harry slipped upstairs to Ron's attic bedroom.
He was lying again on the camp bed in Ron's dingy attic room.
Up in the attic room, Ron examined his Deluminator, and Harry filled Hagrid's mokeskin purse, not with gold, but with those items he most prized, apparently worthless though some of them were the Marauder's Map, the shard of Sirius's enchanted mirror, and R.A.B.'s locket.
Thus, we can conclude that Ron's room and the ghoul's room collectively make up the attic – Ron's room is the main area, and the ghoul's room is the tiny upper space that is accessed through a trapdoor in the ceiling.
Another potential inconsistency is that in Goblet of Fire we saw that Percy's room was on the second landing (i.e. two floors above the ground floor), but in Half-Blood Prince Fred and George's room was said to be on the second floor. If "second floor" means one floor above the ground floor then there is no issue to begin with. Percy's room would simply be one floor above Fred and George's room. However, as Ongo pointed out in comments, "second floor" likely means two floors above the ground floor, in which case that would be the same floor that Percy's room was said to be on. We could resolve this discrepancy either by positing that at some point the rooms were rearranged, or that JK Rowling may have made a small error and mixed up the room locations. A potential support for the former is that in Deathly Hallows the reference is to "Percy's old room". If there had been no changes, we might expect it to have been simply called "Percy's room". Perhaps it is called "Percy's old room" precisely because it was no longer Percy's room at that point.
A final potential discrepancy is that in Deathly Hallows Ginny's room was on the first floor landing, while in Chamber of Secrets she was on the third landing. Once again we would have to assume that rooms were rearranged or that JK Rowling made a small mistake. Alternatively, in Chamber of Secrets it is not directly referred to as her room, so it is theoretically possible that she was just in someone else's room at the moment.
Here is an illustration to show how this works:
As you can see, all the rooms whose locations are named are accounted for. There is also one floor (the one under Ron) that has nothing in it. Since nothing else was specified there, that is likely the floor where Mr. and Mrs. Weasley's bedroom is.
So to summarize the answer, the reason why there are only five bedrooms even though the house has so many floors is that despite having many floors the house does not have a lot of floor space. Each floor is merely a bedroom that was added onto the house, so in fact all the available floor space is used for bedrooms.
Of course this doesn't address why the house doesn't have more floor space than it does, but that was not asked here and there could be any number of reasons.