To me this seems simply anti-competitive. Could Amazon say I cannot make purchaess with a Mac, or Xfinity internet, or a logitech keyboard, or while wearing Levi's jeans? IMO they should have no right to dictate how I make a purchase. Sure, I am not allowed to mass harvest and distribute their data (such as the prices of every item), but for the purposes of making my own best choice I should be allowed to collect datapoints that I could easily and legitimately find on my own .
Yes they absolutely can, none of the things you mentioned are protected classes and they are a private company.
I'm not sure why you would feel entitled to make a purchase on their site outside of their (whatever reasonable or unreasonable) rules may be.
They can block the site on a mac if they dont want you to purchase via a mac. They can block any browser agent they want if they dont like the traffic. They can also close your account if they have some reasons. They dont need a reason either. You agree to a terms of service when you make an account, and that usually means giving them broad leeway.