A primer on the cpr package in R (page 2 of https://arxiv.org/pdf/1705.04756.pdf) writes the following about B-splines.
A B-spline basis matrix is defined by a polynomial order $k$ and knot sequence $\xi$ with the common construction of $k$-fold knots [my emphasis] on the boundaries, set to the minimum and maximum of the support, $l \geq 0$ interior knots, and sorted in a non-decreasing order.
Indeed, when I apply the algorithm on a particular set of points, an optimal sequence of knots is as follows
$$ 0, 0, 0 ,0, 2.45, \dots 597.273, 597.273, 597.273, 597.273$$
That is, there are $4-$fold knots on the boundaries. What is the point in repeating knots?