Update/Provisional Answer
Okay this is strictly speaking not an (informed) answer, however I have managed to resolve the issue.
Debugging
I ran the function and command in a separate dedicated script file, using the command bash -x test.shsuggested by devnull in the comments of the original post.
This yielded quite a lot of feedback in the shell. Here is what I believe to be the most critical feedback, before I aborted it.
username@COMPUTERNAME /d/test
$ bash -x test.sh
+ initg gh username bash_test desc
+ local API=https://api.bitbucket.org/1.0/repositories/
+ local 'DATA=name=bash_test&description=desc&is_private=true&scm=git'
+ local REMOTE=ssh://git@bitbucket.org/username/bash_test
+ '[' gh == gh ']'
+ API=https://api.github.com/user/repos
+ DATA='{"name":"$3", "description": "$4"}'
+ REMOTE=git@github.com:username/bash_test
+ '[' -z https://api.github.com/user/repos ']'
+ '[' -z '{"name":"$3", "description": "$4"}' ']'
+ '[' -z git@github.com:username/bash_test ']'
+ '[' -z username ']'
+ curl -X POST -u username https://api.github.com/user/repos -d '{"name":"$3",' '"description":' '"$4"}'
+ Enter host password for user 'username':
The Issue:
So the issue seems to lie with the variable expression (below) where DATA is set. Firstly the arguments passed to the script, referenced by $3 and $4 cannot be interpolated within a single quoted string.
DATA='{"name":"$3", "description": "$4"}'
Also the spaces after the comma and second semi-colon strangely wrapped in single quotes breaking the string in several pieces, visible in the resulting failed curl call.
Resolution
So apart from using [[ ]] double square brackets instead of the original singular square brackets, I simply wrapped each interpolated variable with curly braces such as ${3} and fixed the use of quotes and spaces in the DATA variable assignment (below):
DATA="{\"name\":\"${3}\",\"description\":\"${4}\"}"
Post script
I this answer can be improved, if anyone can extend on this answer that would be great. I'm confused as to why the $DATA variable used in the curl call resolved to '{"name":"$3",' '"description":' '"$4"}'