What we do is simulate a lot of combinations of stats for your setup. Your setup includes talents, set bonuses, legendary items, etc. That creates a bunch of data points that tell us how much DPS you would do with different stat combinations.
Then, we use machine learning techniques to generate a function that will predict your DPS. This is not a linear function. The function includes the relationship between stats. So, while lots of haste and versatility might be the stat allocation that gets you the highest DPS - it is entirely possible that there is a set of gear with lots of crit and mastery that also does a lot of DPS.
Stat weights have no way to predict this - they are linear and just pick one stat as best and stack it. This is why our new approach is better at picking good gear, but also confusing. Out update to the UI should help with this a bit. Basically... ignore the "stat goals" and just trust that the optimizer is picking gear for you that simulates to the most DPS.
When I say "based on your gear" I meant to say: based on the gear you have available to you. If you are doing Best in Bags, you are limited as to what stat allocations you can get. The optimizer picks the best one you can get from the gear you have - which is why the result will often not seem to match those "stat goals".