Say Alice from the defense/prosecution meets with Bob, some expert/witness, to establish some "facts", and then Alice agrees to call Bob to the stand to establish those "facts" for the court.
But when called the the stand, Bob presents the opposite statements, and completely sabotage's everything Alice was banking on.
Are there any repercussions for Bob, or anything to dissuade him from doing this? Because if there are no repercussions, what's stopping Bob from going to the opposing side to accept money/a favour to do this for them?
Also, just to be clear, consider the topic to not be a "fact", but more so something that is highly contested/controversial. E.g. some "experts" may classify someone as insane, while others would classify the opposite, meaning there's no actual undisputed "fact" per se, and any "expert" is at liberty to think one side or the other.
As one final example about a bad-acting witness/expert, consider the following scenario: Alice wants to establish her client was suffering some malediction. What's stopping her from calling Dr. SnakeOil (or Dr. Oz) to testify as such? Does the expert have to be established as legit by going through some interview as if he were applying to a company?