This may be the result of incomplete refactoring: Perhaps the line was originally obtained from the configuration file (or it is planned to split it into a configuration file) or from user input. In this case, splitting from the string would be natural.
Or it might even match the style from another section that uses this input style. Maybe like this:
function get_sections() { if has_config() { return get_config("sections").split(","); } return "header,nav,footer".split(","); }
A third option may be to simplify the translation.
Not that I used it in any of these cases, but it might make sense for some developers.
source share