.width and .height (the actual dimensions of the “theoretical” rectangle) may be fractional. they’re rendered via opengl as actual geometry, and may be properly scaled by any arbitrary amount.
of course, when opengl actually rasterizes, then they are limited to actual device pixels, but internal storage doesn’t “discard” the fractional dimensions (ie, it’s merely a rendering artifact). so asking for the actual width or height will return the actual width or height.
otoh .contentHeight (along with all related min/max values of .contentBounds) have always been returned as integers. the reason is unclear, but perhaps they’re used in that form for “performance”, perhaps during culling? (pure wild speculation, haven’t checked the source on that)
one could argue that returning fractional content coordinates would be preferable (for example: mouse event coords used to be similarly truncated, but that was changed, and now return fractional content coords, providing far more “accuracy” at low content dimensions on a high-resolution device – search forums for very old posts, it was a real problem)