the output is normal. You ask to replace all characters up to the last a in string. Remember the sed regex are "greedy". They take all they can.
Same as above. That pattern will take all non - characters following a - up to the end of the string. The only part of the string that match that pattern is from the last - up to the end.
This means "replace the first character which isn't a 'x' with nothing". Since that's done as soon as the first 't' is replaced, sed is finished. If you want to remove all characters leading up to the first 'x', use
s/[^x]*//g
In the second snipped:
echo 'x_a_b_a_c_a_d' | sed 's/.*\(a\)/\1/'
you're replacing as many characters as possible from the start until the last possible 'a' with the matched 'a'. The rest of the string isn't affected, so 'x_a_b_a_c_a' is replaced by 'a', which changes 'x_a_b_a_c_a_d' to 'a_d'
Third:
echo 'foo-bar-1.4.5-19.spkg' | sed 's/-[^-]*$//'
means "starting with a dash, take as many non-dash characters as possible until the end, and replace them with nothing", or "remove everything starting from and including the last possible dash".