Because it operates as documented. Using the fine documentation in base R under help(strptime)
:
‘%U’ Week of the year as decimal number (00-53) using Sunday as
the first day 1 of the week (and typically with the first
Sunday of the year as day 1 of week 1). The US convention.
‘%V’ Week of the year as decimal number (01-53) as defined in ISO
8601. If the week (starting on Monday) containing 1 January
has four or more days in the new year, then it is considered
week 1. Otherwise, it is the last week of the previous year,
and the next week is week 1. (Accepted but ignored on
input.)
[...]
‘%W’ Week of the year as decimal number (00-53) using Monday as
the first day of week (and typically with the first Monday of
the year as day 1 of week 1). The UK convention.
Which we can then test using %Y-W
following by the option:
> strftime(as.Date("2020-01-01"), "%Y-W%U")
[1] "2020-W00"
> strftime(as.Date("2020-01-01"), "%Y-W%V")
[1] "2020-W01"
> strftime(as.Date("2020-01-01"), "%Y-W%W")
[1] "2020-W00"
>
What you get in your example are essentially just wrappers around the same functionality. Maybe yearweek()
gives you a choice of convention; if not you now know how to build your own under a different option.