WordPress too. In fact in WordPress the site root URL is stored in two separate configuration fields, so woe betide you if you rewrite one field and not the other.
Thankfully the WP core devs seem to have been slowly cleaning stuff like this up over the last couple years. So even though this wart persists, I have hope it'll eventually get zapped.
Similar comments for Moodle, another popular PHP app. You cannot even change the url for your site without rewriting content in the database.