As long as SEC regulations are complied with, there is nothing illegal nor unethical about a Company repurchasing their own shares.
Once in Treasury, it is at the Company's discretion to either retire or keep them for future use.
Hope this helps.
.
.
Be well