Applying that logic would throw out virtually every story problem in every grade school textbook. It’s an easy problem with an easy solution (at least for an adult), and does a good job of introducing concepts of area and perimeter to a second grader. She can deal with rational and irrational numbers when she’s 18 or 19. And maybe those writers should be more specific. For now, this is a fine problem for a child to solve.
No. It’s not a fine problem for a child to solve because the child is being taught sloppy and unrealistic thinking: shapes all have sides of integer lengths, unwarranted assumptions can be made to make a problem come out nicely. Rot like this in the grade school curriculum is part of why kids struggle with math.