Writing your own implementation (for which there is already an established method in JDK API) can have disadvantages - your method may have bugs where as JDK API method is already tested by Java API creators....
May be due to Performance issue ... you may have a piece of code which call internal JDK API method (or any 3rd party API method ) for string generation and that method is taking too much time ... so you want to write your own String generation method to overcome that performance bottleneck ...
when you want to handle string manipulation yourself (want to have full control over string generation), rather than handling the control to internal JDK API method....