The method was added in the early days of WCF 2.0 to fix an issue with the <base> tag [1]. It is not required since WoltLab Suite 3.0 [2], therefore we should remove their usage in templates and mark the method as deprecated.
[1] 87d877b
[2] 956745b#diff-ff1ef44e01d68770cbadbee4b4ac2613031ac78b4edfc953ba1a5a0927328b16
See https://community.woltlab.com/thread/293058-wcf-getanchor-gibt-falsche-url-zur%C3%BCck/