staircase function tikz

You need to put the \draw commands in the axis, and there is a plot handler that suppress the vertical "jumps", so it suffices to say

\addplot [jump mark left,mark=none,draw=blue,domain=1:7,samples=7,thick]{x+1};

The \cdots can be added as an extra x tick, which you do not draw.

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[>=latex]
\begin{axis}[ymin=1,
axis x line=bottom,
axis y line=left,
xlabel={A},
ylabel=B,xmax=8,ymax=8,
xtick={2,6},xticklabels={$bs_1$,$bs_k$},
ytick={2,3,6},yticklabels={$b_1$,$b_2$,$b_k$},
extra x ticks={4},extra x tick label={$\cdots$},
extra x tick style={tick style={draw=none}}
]
% \addplot [mark=none,draw=red]
% coordinates {(1,1)(1,2)(2,2)(2,3)(3,3)(3,4)(4,4)(4,5)(5,5)(5,6)(6,6)(6,7)(7,7)};
\addplot [jump mark left,mark=none,draw=blue,domain=1:7,samples=7,thick]
{x+1};
\draw [dashed,draw=blue] (1,1) -- (1,0);
\draw [dashed,draw=blue] (2,2) -- (2,0);
\draw [dashed,draw=blue] (3,3) -- (3,0);
\end{axis}
\end{tikzpicture}
\caption{A B C}
\end{figure}
\end{document}

enter image description here

Or ultra thick.

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[>=latex]
\begin{axis}[ymin=1,
axis x line=bottom,
axis y line=left,
xlabel={A},
ylabel=B,xmax=8,ymax=8,
xtick={2,6},xticklabels={$bs_1$,$bs_k$},
ytick={2,3,6},yticklabels={$b_1$,$b_2$,$b_k$},
extra x ticks={4},extra x tick label={$\cdots$},
extra x tick style={tick style={draw=none}}
]
% \addplot [mark=none,draw=red]
% coordinates {(1,1)(1,2)(2,2)(2,3)(3,3)(3,4)(4,4)(4,5)(5,5)(5,6)(6,6)(6,7)(7,7)};
\addplot [jump mark left,mark=none,draw=blue,domain=1:7,samples=7,ultra thick]
{x+1};
\draw [dashed,draw=blue] (1,1) -- (1,0);
\draw [dashed,draw=blue] (2,2) -- (2,0);
\draw [dashed,draw=blue] (3,3) -- (3,0);
\end{axis}
\end{tikzpicture}
\caption{A B C}
\end{figure}
\end{document}

enter image description here