Why in user-registration sample you set role both manually and by default?

Why in sample-user-registration you have User.isDefaultRole set to true in init scripts sample-user-registration/30.create-db.sql at 87f6bdecbb88a390ba08253145ed61a8a78072a3 · cuba-platform/sample-user-registration · GitHub
Then in sample-user-registration/RegistrationServiceBean.java at 87f6bdecbb88a390ba08253145ed61a8a78072a3 · cuba-platform/sample-user-registration · GitHub
you apply User role to newly created user. When I did so in postgesql I understood that if User.isDefaultRole is set to true then this action is performed automatically for every new user and if I addidtionally perform this action from java as you do in sample I get idx_sec_user_role_uniq_role constarint violation.
So I believe you must either set User.isDefaultRole to false and apply User role to new user through java Or set User.isDefaultRole to true and platform will perform it automatically… But not both at the same time as you did. Am I wrong?

I belive this sample in the first version did not have this flag set as true. Probably, just a small bug in the sample.