Why do we divide the regularization term by the number of examples in regularized logistic regression?
There are several possible intuitions behind that as explained here, but the strongest argument for me is the following one.

The „best“ form of the loss function is the one that requires the least amount of tweaking, e.g. for different dataset sizes. Dividing the regularization term by the number of samples reduces its significance for larger datasets. And, indeed, since regularization is needed to prevent overfitting, its impact should be reduced (in favor of the impact of the data itself) if a larger amount of data is available.

This way the same $\lambda$ value has better chances for working with the whole dataset as well as with a small part of it without adjusting.